6 Replies Latest reply on Jul 16, 2002 3:30 PM by Dain Sundstrom

    jboss3.0 IllegalStateException: removing bean lock and it ha

    Andrew Lau Newbie

      Hi!

      I am using jboss3.0 cmp.

      I have a parent entity bean that I have set to 'cascade delete' all its children. But when I try to remove that bean, I always got the following exception:

      .............
      java.lang.IllegalStateException: removing bean lock and it has tx set!
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.removeRef(QueuedPessimisticEJBLock.java:469)
      at org.jboss.ejb.BeanLockManager.removeLockRef(BeanLockManager.java:78)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:124)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.invokeRemoveRelation(JDBCCMRFieldBridge.java:759)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.destroyRelationLinks(JDBCCMRFieldBridge.java:696)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.destroyRelationLinks(JDBCCMRFieldBridge.java:674)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet.clear(RelationSet.java:163)
      ......

      Can somebody tell me how to work around this? Thank you very much!

      Andrew