Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Getting java.lang.NoSuchMethodError

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
And then the flying monkeys attacked. My only defense was this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic