I'm developing an application that takes data from our legacy system
and loads that data into the new system using Entity EJBs but when it starts
to load a certain amount of records from our Accounts table, I get an
IllegalStateException from AbstractInstanceCache.insert().  I believe this
is similar to the problem in a previous post where consecutive inserts
produce the ISE but adding pauses between inserts makes the problem go away.

        I've tested my code against the RI from Sun and it works fine there.

        I've researched this problem (last message regarding this thread can
be found here
http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg04395.html)
but I still can't fix it.  I've tried modifying
BMPPersistenceManager.createEntity() by wrapping the cache insertion section
with a synchronized clause against the AbstractInstanceCache.getCacheLock()
return object (comments in AbstractInstanceCache seem to indicate that this
should be done) but that hasn't fixed it.

        Does anyone know where I should look to fix it?  Is someone else
already working on this?  If not, does anyone have a sequence diagram for
ejbCreate()?

        Here's my stack trace:

[Account] TRANSACTION ROLLBACK EXCEPTION:null; nested exception is:
javax.ejb.EJBException
[Account] java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING
BEAN, ID = 106
[Account]       at
org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractInstanceCache.jav
a:207)
[Account]       at
org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManag
er.java:165)
[Account]       at
org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
[Account]       at java.lang.reflect.Method.invoke(Native Method)
[Account]       at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine
r.java:639)
[Account]       at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync
hronizationInterceptor.java:160)
[Account]       at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
erceptor.java:87)
[Account]       at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[Account]       at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:263)
[Account]       at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[Account]       at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:164)
[Account]       at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[Account]       at
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
[Account]       at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:369)
[Account]       at java.lang.reflect.Method.invoke(Native Method)
[Account]       at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[Account]       at sun.rmi.transport.Transport$1.run(Transport.java:152)
[Account]       at java.security.AccessController.doPrivileged(Native
Method)
[Account]       at
sun.rmi.transport.Transport.serviceCall(Transport.java:148)
[Account]       at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
[Account]       at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
06)
[Account]       at java.lang.Thread.run(Thread.java:484)


---
Michael R. Maraya
DOL / OCFO / OFS / DFAD
(202) 693-6928

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to