NoClassDefFoundError « cfg « JPA Q&A





1. NoClassDefFoundError with org.hibernate.cfg.Configuration    forum.hibernate.org

Hi there, I have a problem with initialising a google web toolkit (gwt) application using hibernate under tomcat. When using the same application from eclipse, everything works fine. The setup looks as follows: I placed all needed jars under WEB-INF/lib. The gwt server files are placed under WEB-INF/classes. The db persistency with hibernate is used in an external project that I ...

2. NoClassDefFoundError: org/hibernate/cfg/Configuration    forum.hibernate.org

Ok, I am using maven, and had some trouble getting hibernate through dependencies, so added the 3.6.0 release manually. The hibernate3.jar file was copied by maven into .../.m2/repository/org/hibernate/hibernate/3.6.0, and renamed hibernate-3.6.0.jar (as far as i can tell, same size and what looks to be same content). I then added a dependency to hibernate in maven, like this: org.hibernate hibernate 3.6.0 ...

3. NoClassDefFoundError: org/hibernate/cfg/Configuration    forum.hibernate.org

I am creating a jar file for one application. In this am using eclipse i had written the code for fetching the session through Hibernate and creating the jar. if i upload the jar to my application am getting the "NoClassDefFoundError: org/hibernate/cfg/Configuration". If i comment the Hibernate code, i did not get any error control goes to end of the class.I ...

4. NoClassDefFoundError: org/hibernate/cfg/Configuration    forum.hibernate.org

Beginner Joined: Thu Jul 21, 2005 10:28 am Posts: 21 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.0.5 Full stack trace of any exception that occurs: [7/27/05 12:45:48:969 EDT] 1b6f1eea SystemOut O HibernateUtil: Building SessionFactory failed: java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration [7/27/05 12:45:48:969 EDT] 1b6f1eea SystemErr R java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration [7/27/05 12:45:48:969 EDT] 1b6f1eea SystemErr R at com.starwood.saratoga.dataaccess.HibernateUtil.(HibernateUtil.java:20) [7/27/05 12:45:48:969 ...

5. What cfg.configure() does :: noClassDefFoundError wrong name    forum.hibernate.org

Ok, here goes: the ant script that executes the package lies in ~/cerberus/cerberus/ant/trunk/ The package (za/ac/up/cs/espresso/cerberus) itself lies in: ~/tinyos/tinyos-1.1.13/tools/java, which results in the class files being in: ~/tinyos/tinyos-1.1.13/tools/java/za/ac/up/cs/espresso/cerberus The hibernate mapping files lies in the same directory as the class files. The hibernate config (cfg.xml) file lies in ~/tinyos/tinyos-1.1.13/tools/java/ (thus, the root of the package). The hibernate config file refers ...

6. java.lang.NoClassDefFoundError: org/hibernate/cfg/SettingsFa    forum.hibernate.org

Hi all, I already downloaded hibernate-entitymanager-3.2.0.CR1 and tried to use in J2SE project. I added all jars that are included in zip on my project classpath (hibernate-entitymanager.jar, ejb3-persistence.jar, hibernate-annotations.jar, javassist.jar, jboss-archive-browsing.jar). However, I got exception when the project was executed: Exception in thread "main" java.lang.NoClassDefFoundError: org/hibernate/cfg/SettingsFactory at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:113) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:37) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27) What is missing on project classpath? Should I download ...

7. Absurd NoClassDefFoundError: org/hibernate/cfg/Configuration    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.2.1 Mapping documents: hibernate.cfg.xml Code between sessionFactory.openSession() and session.close(): protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { SimpleDateFormat dateFormatter = new SimpleDateFormat("dd.MM.yyyy"); try { System.out.println("----------- EventManagerServlet - 1"); // Begin unit of work HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction(); System.out.println("----------- EventManagerServlet - 2"); // Write HTML header PrintWriter out = response.getWriter(); out.println("Event ...</p></div></td></tr></table></div></div><footer><p class='pull-right'><a href='http://www.java2s.com/'>java2s.com</a>  | © Demo Source and Support. All rights reserved.</p></footer></div></body></html>