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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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

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 @ And have included following jars as user libraries in project:-

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

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
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:
subject: Error:java.lang.NoClassDefFoundError: javax/persistence/EntityList
jQuery in Action, 3rd edition