Hibernate version:3.3.1.GA
I'm using Tomcat 6.
I can compile my classes fine, but when I try to run the webapp, I get:
Code:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error instantiating servlet class com.pkc.games.GamesServlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:636)
root cause
java.lang.NoClassDefFoundError: org/hibernate/Session
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
java.lang.Class.getConstructor0(Class.java:2716)
java.lang.Class.newInstance0(Class.java:343)
java.lang.Class.newInstance(Class.java:325)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:636)
root cause
java.lang.ClassNotFoundException: org.hibernate.Session
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
java.lang.Class.getConstructor0(Class.java:2716)
java.lang.Class.newInstance0(Class.java:343)
java.lang.Class.newInstance(Class.java:325)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:636)
Here's my classpath:
Code:
me@mycomputer:~$ echo $CLASSPATH
.:/home/me/tomcat6/lib/servlet-api.jar:/home/me/tomcat6/lib/jsp-api.jar:/home/me/tomcat6/webapps:/home/me/tomcat6/lib/mysql-connector-java-5.1.6.jar:/home/me/tomcat6/lib/hibernate3.jar:
I was able to test my classes before dumping them into Tomcat and they persisted my test objects into MySQL perfectly fine. I can't figure out why Tomcat can't find Hibernate. I don't see any spelling errors or missing colons or anything!