This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Exception in example Using Hibernate Entity Manager in 2nd chapter of Java Persistence WithHibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Exception in example Using Hibernate Entity Manager in 2nd chapter of Java Persistence WithHibernate" Watch "Exception in example Using Hibernate Entity Manager in 2nd chapter of Java Persistence WithHibernate" New topic
Author

Exception in example Using Hibernate Entity Manager in 2nd chapter of Java Persistence WithHibernate

Deepaks Deshpande
Ranch Hand

Joined: Dec 06, 2007
Posts: 95

Hi,

I am trying out the hello world example in the 2nd chapter (sesction 2.2.2 Using Hibernate Entity Manager)of Manning's Java Persistence with Hibernate book.
I have created a simple java project in eclipse called HibernateEntityManager. I have included the following jars in the lib folder.


I have the "persistence.xml" file under the META_INF directory which is placed under the src directory.
When I am running this application It is giving me the following exception

I have googled regarding the exception and its cause but i have been unable to find any solution for the same.
Thank you.


Regards,
Deepak

Deepaks Deshpande
Ranch Hand

Joined: Dec 06, 2007
Posts: 95

Hi guys,

I have solved this problem. It is due to duplicate dependencies because of additional jars. Now the required jar for this application are

Thank you.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Exception in example Using Hibernate Entity Manager in 2nd chapter of Java Persistence WithHibernate
 
Similar Threads
Cannot get Hibernate 3.1 to work with c3p0
Hibernate: Mapping a sequence to a serial (autoincr) field (Postgresql)
Hibernate exception problem
Transaction is not being committed
Could not parse configuration: /hibernate.cfg.xml