Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction marked for rollback on ejbCreate()? Servlet->CMP EJB1.0->Mysql DB  RSS feed

 
Laurency Heo
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i deploeyed a test .ear (Servlet->CMP EJB1.0->Mysql DB), method transaction is Required.
What do in the servlet:
home.findByPrimaryKey(theName);
// Found sucessfully!

home.create("Wang Wang", "Laurency");
//no external transaction here.
//RollbackException thown.
Please help a ideal, thanks a lot.
------------------------------------
Caused by: java.rmi.RemoteException: Transaction aborted (possibly due to transaction time out).; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback; nested exce
ption is:
javax.transaction.RollbackException: Transaction marked for rollback
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:389)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:431)
at PetBean_PM_RemoteHomeImpl.create(PetBean_PM_RemoteHomeImpl.java:32)
at _PetHome_Stub.create(Unknown Source)
... 37 more
Caused by: javax.transaction.RollbackException: Transaction marked for rollback
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:161)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:243)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1485)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1303)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:403)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!