• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help with CMP implementation.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am in the process of learning EJB from the scratch. I am also preparing for SCBCD in the process. I wrote a CMP bean to insert a row of data into the database. I am using the j2ee RI to deploy my bean.

I have written the RemoteComponent interface, Home interface and the bean. I have successfully deployed it too using the deploytool in j2ee. The database i use is the default Cloudscape.

I get the following error when i try to call create on the Home object ..

home.create(.....);

this gives out a transactionRollBackException.

Can any one kindly help me on how to get over this issue ?

The stack trace is given below.

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: Transaction aborted (possibly due to transaction time out).; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback; nested exception is:
javax.transaction.RollbackException: Transaction marked for rollback
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:64)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
at com.uforians.ejb._UforianHome_Stub.create(Unknown Source)
at com.uforians.client.UforianClient.main(UforianClient.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Caused by: java.rmi.RemoteException: Transaction aborted (possibly due to transaction time out).; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback; nested exception 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 com.uforians.ejb.UforianBean_PM_RemoteHomeImpl.create(UforianBean_PM_RemoteHomeImpl.java:40)
at com.uforians.ejb._UforianBean_PM_RemoteHomeImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:520)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:210)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
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:1289)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:403)
... 8 more
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nandakumar,
A transaction rollback exception usually means that there was some problem inserting the row into the database. Check you are setting all non-null fields, there are no duplicate keys and that you aren't violating any constraints.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic