Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPA JOTM Transaction issue  RSS feed

Praveen Pulluru
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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)

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!