Looks like a JBOSS bug
milamipha Jan 8, 2002 1:18 PMI am using jboss 2.4.3. I am trying to remove EntityBeans and creating them again (I do have a reason!!!). This is all in the same session bean method. I am using caontainer transaction for the session bean. I get the following exception while doing this.
-------------------------------------------------------
[Policytopomhd2boxmapApp] Activated bean Policytopomhd2boxmapApp with id = com.r
anch.mss.objectmodel.common.Policytopomhd2boxmapPK@6cbbd313
[PolicyTopoMgrEJB] updatePolicy() has removed: topoid=53 srcmhdname=mhd1 dstmhd
name=mhd1 boxid=1
[PolicyTopoMgrEJB] updatePolicy(): inserting map: topoid=53 srcmhdname=mhd1 dst
mhdname=mhd1 boxid=1
[Policytopomhd2boxmapApp] TRANSACTION ROLLBACK EXCEPTION:INSERTING AN ALREADY EX
ISTING BEAN, ID = com.ranch.mss.objectmodel.common.Policytopomhd2boxmapPK@6cbbd3
13; nested exception is:
java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID
= com.ranch.mss.objectmodel.common.Policytopomhd2boxmapPK@6cbbd313
[Policytopomhd2boxmapApp] java.lang.IllegalStateException: INSERTING AN ALREADY
EXISTING BEAN, ID = com.ranch.mss.objectmodel.common.Policytopomhd2boxmapPK@6cbb
d313
[Policytopomhd2boxmapApp] at org.jboss.ejb.plugins.AbstractInstanceCache.i
nsert(AbstractInstanceCache.java:247)
[Policytopomhd2boxmapApp] at org.jboss.ejb.plugins.EntityInstanceIntercept
or.invokeHome(EntityInstanceInterceptor.java:171)
[Policytopomhd2boxmapApp] at org.jboss.ejb.plugins.EntityLockInterceptor.i
nvokeHome(EntityLockInterceptor.java:108)
[Policytopomhd2boxmapApp] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke
Next(TxInterceptorCMT.java:135)
[Policytopomhd2boxmapApp] at org.jboss.ejb.plugins.TxInterceptorCMT.runWit
hTransactions(TxInterceptorCMT.java:307)
[Policytopomhd2boxmapApp] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke
Home(TxInterceptorCMT.java:86)
[Policytopomhd2boxmapApp] at org.jboss.ejb.plugins.SecurityInterceptor.inv
okeHome(SecurityInterceptor.java:103)
[Policytopomhd2boxmapApp] at org.jboss.ejb.plugins.LogInterceptor.invokeHo
me(LogInterceptor.java:106)
----------------------------------------------------
Seems to be a problem with instancepool. Somehow even after EntityBean was removed the PK of the object is still associated with the free instance ( or something like that !!!!!!!) Hence when trying to create the same bean ( same PK ) it gives this exception. Can anyone tell what is going on? TIA,
- Milind