Two Laptop Bag*
The moose likes Other Application Frameworks and the fly likes Getting java.lang.NoSuchMethodError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Getting java.lang.NoSuchMethodError" Watch "Getting java.lang.NoSuchMethodError" New topic
Author

Getting java.lang.NoSuchMethodError

suneel kota
Greenhorn

Joined: Jun 06, 2006
Posts: 24
Hi all,

I am running an application spring with hibernate. i am getting problem when i am using getHibernateTemplate.find("From Login");

the error in my console is

type Exception report

message

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

exception

javax.servlet.ServletException: Servlet execution threw an exception


root cause

java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(Lorg/springframework/core/io/Resource I
org.springframework.jdbc.support.SQLErrorCodesFactory.<init>(SQLErrorCodesFactory.java:104)
org.springframework.jdbc.support.SQLErrorCodesFactory.<clinit>(SQLErrorCodesFactory.java:66)
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.setDataSource(SQLErrorCodeSQLExceptionTranslator.java:126)
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.<init>(SQLErrorCodeSQLExceptionTranslator.java:92)
org.springframework.orm.hibernate.SessionFactoryUtils.newJdbcExceptionTranslator(SessionFactoryUtils.java:134)
org.springframework.orm.hibernate.HibernateAccessor.getJdbcExceptionTranslator(HibernateAccessor.java:224)
org.springframework.orm.hibernate.HibernateTemplate.getSession(HibernateTemplate.java:410)
org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:354)
org.springframework.orm.hibernate.HibernateTemplate.delete(HibernateTemplate.java:636)
org.springframework.orm.hibernate.HibernateTemplate.delete(HibernateTemplate.java:632)
com.i3l.login.dao.LoginDaoImpl.delete(LoginDaoImpl.java:121)
com.i3l.login.service.LoginServiceimpl.deleteRecord(LoginServiceimpl.java:84)
com.i3l.login.mvc.LoginController.handle(LoginController.java:29)
org.springframework.web.servlet.mvc.AbstractCommandController.handleRequestInternal(AbstractCommandController.java:79)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:119)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:389)
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:339)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:315)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.



Please help me to solve this issue..

Thanx in advance

Regards
SuneelKota
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Strange error. Make sure you don't have to versions of Spring in the CLASSPATH.


[My Blog]
All roads lead to JavaRanch
suneel kota
Greenhorn

Joined: Jun 06, 2006
Posts: 24
Hi satou,

I did not put two versions of spring in my lib folder, please inform me if you come across this problem or tell me the way to access getHibernateTemplate method.

Thanks & Regards
SuneelKota
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Getting java.lang.NoSuchMethodError
 
Similar Threads
unique key hibernate exception
I am getting this exception
Error while instantiating JdbcTemplate in spring-config.xml?
UnsatisfiedLinkError
exception while mapping boolean object to char table field