giuseppe D'Amico

Greenhorn
+ Follow
since Oct 04, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by giuseppe D'Amico


Hi I am new to Spring, in my application I need to use jdbctemplate to connect to Mysql:
this is my pom.xml:



my web.xml:


my root-context.xml


when I run it I get this error:
HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.ListableBeanFactory.getBeanDefinitionNames(Ljava/lang/Class;)[Ljava/lang/String;

type Exception report

message Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.ListableBeanFactory.getBeanDefinitionNames(Ljava/lang/Class;)[Ljava/lang/String;

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.ListableBeanFactory.getBeanDefinitionNames(Ljava/lang/Class;)[Ljava/lang/String;
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:972)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause

java.lang.NoSuchMethodError: org.springframework.beans.factory.ListableBeanFactory.getBeanDefinitionNames(Ljava/lang/Class;)[Ljava/lang/String;
org.springframework.jdbc.support.SQLErrorCodesFactory.<init>(SQLErrorCodesFactory.java:96)
org.springframework.jdbc.support.SQLErrorCodesFactory.<clinit>(SQLErrorCodesFactory.java:62)
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:89)
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:78)
org.springframework.jdbc.support.JdbcAccessor.getExceptionTranslator(JdbcAccessor.java:58)
org.springframework.jdbc.support.JdbcAccessor.afterPropertiesSet(JdbcAccessor.java:71)
org.springframework.jdbc.core.JdbcTemplate.<init>(JdbcTemplate.java:115)
com.metmi.mmasgis.dao.DbImpl.getDatabases(DbImpl.java:27)
com.metmi.mmasgis.HomeController.dbs(HomeController.java:61)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


My controller:

my DAO's implementation:


I do nort understand this error,maybe some conflicting jar, I need to be put in the right direction.
10 years ago
Thanks for your reply, I solved, just a stupid mistake.
HI, I have a servlet that performs two differents query to a mysql db in function of the task,so only one at a time is used but one after the other in very fast sequence, each of them return a json, I have two identical methods parameters_list and potentials_list, but only parameters_list works properly the second one obtain from mysql an empty resultset, I can not figure why. Here it is the relevant code for the two methods:
Parameters_list is the working one


and the code for potentials_list that does not work


both methods
use a third one for json encoding

the two methods are the same apart the query and the key I use for the json to return, so do not understand whi potential_list obtain a void resultSet in queryDb4Potentials, I wish someone can help me,
thanks in advance
Hi I am a newbie in Spring and Tomcat too I am following this tutorial Chapter 1. Basic Application and Environment Setup and I stuck with the tomcat configuration of springapp/build.properties' I use Eclipse with Mongrel, what is the best way to learn spring; Do I have to understand well ant and tomcat before? can you advice me how to configure this file? Thanks in advance
13 years ago