This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes [JPA] I got a exception javax.persistence.RollbackException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[JPA] I got a exception javax.persistence.RollbackException" Watch "[JPA] I got a exception javax.persistence.RollbackException" New topic
Author

[JPA] I got a exception javax.persistence.RollbackException

Runrioter Wung
Greenhorn

Joined: Sep 03, 2011
Posts: 29
Hello,everyone!
I am learning JPA,But when I am coding the first app,I fail...
I use the Hibernate implement of JPA..


When I run it,I got the following exception:
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Its giving you a NullPointerException , maybe you are getting null entity on your entity manager . Also, what is on line 30 of EmployeeServiceTest.java?


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Runrioter Wung
Greenhorn

Joined: Sep 03, 2011
Posts: 29
Saif Asif wrote:Its giving you a NullPointerException , maybe you are getting null entity on your entity manager . Also, what is on line 30 of EmployeeServiceTest.java?

Here the line 30 is

And I promise that it isn't a null entity.
Runrioter Wung
Greenhorn

Joined: Sep 03, 2011
Posts: 29
I have got the answer.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

oh thats great ! What exactly was the issue ?
Runrioter Wung
Greenhorn

Joined: Sep 03, 2011
Posts: 29
Saif Asif wrote:oh thats great ! What exactly was the issue ?

The jars included was in different versions. Incompatible.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

I see. Well glad you solved your issue
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [JPA] I got a exception javax.persistence.RollbackException
 
Similar Threads
persistence.xml file for MS SQL Server 2000
Could not generate OneToMany records using @ElementCollection in JPA 2
Simple But Crazy Cascade Problem
onetoone unidirectional relationship problem
JPA - How to persist new table without exception (SE) environment