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 [JPA] I got a exception javax.persistence.RollbackException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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