NoClassDefFoundError « Tomcat « JPA Q&A





1. Hibernate with Tomcat NoClassDefFoundError    coderanch.com

Updating in case anyone finds this helpful. The simple solution is that j2ee.jar was missing from the classpath. I just migrated from Java 1.4 to Java 1.5 and from Tomcat 4 to Tomcat 5 and Sun does not have a j2ee distribution for 1.5 yet (at least not that i could find). so whereas the j2ee.jar was in my Sun/AppServer/lib path ...

2. Get java.lang.NoClassDefFoundError on Linux, Tomcat, MySQL    forum.hibernate.org

Hi, I developed an application that works fine on a Windows machine, however when I deploy the app to a Linux box, I got the following error. The environment is: Tomcat 4.1.23, MySQL 3.0.8. Jdk1.4.2 java.lang.NoClassDefFoundError at com.mminteractive.ups.services.HibernateUpsDAO.login(HibernateUpsDAO.java:65) at com.mminteractive.ups.services.UpsService.login(UpsService.java:29) at com.mminteractive.ups.actions.LoginAction.execute(LoginAction.java:69) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176) at ...

3. NoClassDefFoundError when in Servlet under Tomcat    forum.hibernate.org

I am encountering this error (java.lang.NoClassDefFoundError: org/hibernate/cfg/HbmBinder$SecondPass) when I try to get a Hibernate session using the follow code: Configuration cfg = new Configuration(); cfg.addClass(test.Widget.class); The NoClassDefFoundError only occurs when I am running it inside a servlet in Tomcat. If I am running the exact same code in a standalone static main(), it works perfectly. This is hibernate 3.1.2, and I ...