Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

spring with hibernate showing exception

 
sanu jony
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help me!
while i am trying use hibernate sessionfactory in spring servlet.xml i am getting following exceptions.

java.lang.NoClassDefFoundError
net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:791)
org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:417)
org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:355)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:707)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:202)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:159)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:172)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:265)
org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:125)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:297)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:245)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:215)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:89)
javax.servlet.GenericServlet.init(GenericServlet.java:256)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:536)
I am not getting any idea about these exceptions.
If knows the reamedy for this please help me.
 
vishwa venkat
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make sure u have all the hibernate/lib/*.jar files and hibernate2.jar file in u'r classpath.
 
sanu jony
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
i coppied all the jar files to my lib dir.
then the application executed
thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic