0 Replies Latest reply on Mar 15, 2002 10:22 PM by Tariq I. Siddiqui

    javax.transaction.TransactionRolledbackException: removing b

    Tariq I. Siddiqui Newbie

      I am using bean managed persistence, after I call find...
      method I call one of my get.. funtions to get the entity data.

      I get following stack:
      [ERROR,Company] TRANSACTION ROLLBACK EXCEPTION:
      javax.transaction.TransactionRolledbackException: removing bean lock and it has tx set!; nested exception is:
      java.lang.IllegalStateException: removing bean lock and it has tx set!
      java.lang.IllegalStateException: removing bean lock and it has tx set!
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.removeRef(QueuedPessimisticEJBLock.java:441)
      at org.jboss.ejb.BeanLockManager.removeLockRef(BeanLockManager.java:78)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:142)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:428)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:410)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
      at sun.rmi.transport.Transport$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)

      Following is my ejb-jar.xml section for this particular entity.


      <ejb-name>Company</ejb-name>
      com.eproject.interfaces.CompanyHome
      com.eproject.interfaces.Company
      <ejb-class>com.eproject.ejb.CompanyBean</ejb-class>
      <persistence-type>Bean</persistence-type>
      False
      <prim-key-class>java.lang.Integer</prim-key-class>