File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Error:java.lang.NoClassDefFoundError: javax/persistence/EntityList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Error:java.lang.NoClassDefFoundError: javax/persistence/EntityList" Watch "Error:java.lang.NoClassDefFoundError: javax/persistence/EntityList" New topic
Author

Error:java.lang.NoClassDefFoundError: javax/persistence/EntityList

Vikram Kohli
Ranch Hand

Joined: Nov 27, 2005
Posts: 174
Hi All,

I have just started learning Hibernate. And following tutorial @ http://www.vaannila.com/hibernate/hibernate-example/hibernate-tools-1.html. And have included following jars as user libraries in project:-
antlr-2.7.6.jar,commons-collections-3.1.jar,dom4j-1.6.1.jar,hibernate3.jar,javassist-3.12.0.GA.jar,jta-1.1.jar,log4j-1.2.8.jar,mysql-connector-java-5.1.13-bin.jar,slf4j-api-1.6.1.jar,slf4j-simple-1.6.1.jar.

But when I am running the Main program I am getting following error in console:-



Request you all to please help in solving the above error.


Vikram PracLabs
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Do you have the JPA jar file in there? Which version of Hibernate are you using? Here are my jar files for 3.5:



Getting Started with Hibernate: Jar Files and Such

Vikram Kohli
Ranch Hand

Joined: Nov 27, 2005
Posts: 174
Thanks Cameron . It worked

Thanks Alot again
Vikram
Alan Hampson
Ranch Hand

Joined: Apr 10, 2009
Posts: 31
This seems to be caused by Hibernate 3.6. It is now dependent on JPA, so it must have a JPA jar in the class path as well. You can find one in the Hibernate 3.6 distro: hibernate-distribution-3.6.0.Final/lib/jpa/hibernate-jpa-2.0-api-1.0.0.Final.jar

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error:java.lang.NoClassDefFoundError: javax/persistence/EntityList