File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes JPA JOTM Transaction issue 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 JOTM Transaction issue" Watch "JPA JOTM Transaction issue" New topic

JPA JOTM Transaction issue

Praveen Pulluru

Joined: Sep 26, 2013
Posts: 1

I'm developing a application with JPA(Hibernate) as backend. I have a DAO and JPADAO for each entity and my process updates more than one entity as one unit of work, so I decided to use JTA as it allows me to control the transactions so here's how my code looks persistence.xml

Now when I try to begin a transaction and commit changes to the entities(more than one) then it throws and exception and calls the utx.rollback but it will not rollback it has commited the transaction only partially not all entities are saved

java.lang.IllegalStateException: Cannot get Transaction for rollback
at org.objectweb.jotm.Current.rollback(

org.omg.CORBA.BAD_INV_ORDER: The Servant has not been associated with an ORB instance vmcid: 0x0 minor code: 0 completed: No
at org.omg.PortableServer.Servant._get_delegate(Unknown Source)
at org.omg.PortableServer.Servant._poa(Unknown Source)
at org.objectweb.jotm._SubCoordinator_Tie.deactivate(Unknown Source)
at Source)
at Source)
at javax.rmi.CORBA.Util.unexportObject(Unknown Source)
at Source)
at javax.rmi.PortableRemoteObject.unexportObject(Unknown Source)

I agree. Here's the link:
subject: JPA JOTM Transaction issue
It's not a secret anymore!