Bugs item #582428, was opened at 2002-07-16 22:33
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=582428&group_id=22866
Category: JBossServer
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Lau (andrewlau4)
Assigned to: Bill Burke (patriot1burke)
Summary: ejb remove cause IllegalStateException
Initial Comment:
This problem happens in jboss 3.0 and 3.0.1 RC1
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 sometimes got the following exception:
.............
java.lang.IllegalStateException: removing bean lock and
it has tx set!
at
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.r
emoveRef(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.runWithTransacti
ons(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.JDBCCMRFieldBri
dge.invokeRemoveRelation
(JDBCCMRFieldBridge.java:759)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBri
dge.destroyRelationLinks
(JDBCCMRFieldBridge.java:696)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBri
dge.destroyRelationLinks
(JDBCCMRFieldBridge.java:674)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet.clear
(RelationSet.java:163)
......
But I may have found a quick solution for now. The
IllegalStateException exception only happens when I
call EJBLocalObject remove() method. Now I changed
my code so it calls EJBLocalHome remove() method
instead. Since then, it seems working fine so far.
----------------------------------------------------------------------
Comment By: Panagiotis Korros (pkorros)
Date: 2002-07-22 15:25
Message:
Logged In: YES
user_id=552526
I have the same problem myself. It appears sometimes and
calling the EJBLocalHome.remove() method dosn't solve the
problem.
I have two methods calling the remove method on a session
bean.
the first calles the remove directly and seems to work fine.
the second method loads many beans and calls the remove
method to some of them according to an algorythm.
the exception i get in JBoss 3.0 final is:
java.lang.IllegalStateException: removing bean lock and it has
tx set!
at
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.remov
eRef(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:494)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.in
vokeRemoveRelation(JDBCCMRFieldBridge.java:759)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.d
estroyRelationLinks(JDBCCMRFieldBridge.java:696)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.d
estroyRelationLinks(JDBCCMRFieldBridge.java:674)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.s
etInstanceValue(JDBCCMRFieldBridge.java:608)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.r
emoveFromRelations(JDBCRemoveEntityCommand.java:133)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.
execute(JDBCRemoveEntityCommand.java:67)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.removeEnt
ity(JDBCStoreManager.java:562)
at
org.jboss.ejb.plugins.CMPPersistenceManager.removeEntity
(CMPPersistenceManager.java:542)
at
org.jboss.resource.connectionmanager.CachedConnectionInte
rceptor.removeEntity(CachedConnectionInterceptor.java:431)
at org.jboss.ejb.EntityContainer.remove
(EntityContainer.java:507)
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
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke
(EntityContainer.java:1212)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invok
e(JDBCRelationInterceptor.java:190)
at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke
(EntitySynchronizationInterceptor.java:340)
at
org.jboss.resource.connectionmanager.CachedConnectionInte
rceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke
(EntityInstanceInterceptor.java:193)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke
(EntityLockInterceptor.java:107)
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:494)
at
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke
(BaseLocalContainerInvoker.java:296)
at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke
(LocalHomeProxy.java:105)
at $Proxy37.remove(Unknown Source)
at ecentric.ejb.TreeBean.setShortcutsToNode
(TreeBean.java:618)
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
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor
.invoke(StatelessSessionContainer.java:664)
at
org.jboss.resource.connectionmanager.CachedConnectionInte
rceptor.invoke(CachedConnectionInterceptor.java:186)
at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.inv
oke(StatelessSessionInstanceInterceptor.java:77)
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.StatelessSessionContainer.invoke
(StatelessSessionContainer.java:313)
at
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke
(BaseLocalContainerInvoker.java:296)
at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke
(StatelessSessionProxy.java:81)
at $Proxy46.setShortcutsToNode(Unknown Source)
at ecentric.ws.TreeWebService.doGet
(TreeWebService.java:172)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
....
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=582428&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development