• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Getting java.lang.NoSuchMethodError

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Strange error. Make sure you don't have to versions of Spring in the CLASSPATH.
 
suneel kota
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
It's weird that we cook bacon and bake cookies. Eat this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic