From: Ferguson, D. <dfe...@co...> - 2001-05-20 19:15:58
|
Hi, When I call home.create() for my entity bean it behaves just fine under normal situations. However if I call home.create() serveral times in succession only the first call will work the others will throw and IllegalStateException. The exception is getting when becuase the InstanceCache object finds the id in it's cache.. Which is bizarre because the I print out the id and it is unique. Another thing that is bizare is the message that comes back from the instant cache indicates that the id is 0! Any ideas? Stack Trace.... ******************************************************* Login] Found CoreUser interface [CoreUserBean] TRANSACTION ROLLBACK EXCEPTION:null; nested exception is: javax.ejb.EJBException [CoreUserBean] java.lang.IllegalStateException: INSERTING AN ALREADY EXISTING BEAN, ID = 0 [CoreUserBean] at org.jboss.ejb.plugins.AbstractInstanceCache.insert(AbstractInstanceCache.jav a:207) [CoreUserBean] at org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManag er.java:165) [CoreUserBean] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441) [CoreUserBean] at java.lang.reflect.Method.invoke(Native Method) [CoreUserBean] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine r.java:639) [CoreUserBean] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync hronizationInterceptor.java:160) [CoreUserBean] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt erceptor.java:87) [CoreUserBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135) [CoreUserBean] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:263) [CoreUserBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86) [CoreUserBean] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav a:164) [CoreUserBean] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106) [CoreUserBean] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316) [CoreUserBean] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai nerInvoker.java:369) [CoreUserBean] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai nerInvoker.java:423) [CoreUserBean] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212) [CoreUserBean] at $Proxy43.create(Unknown Source) [CoreUserBean] at com.coremetrics.security.LoginBean.createCoreUser(LoginBean.java:61) [CoreUserBean] at java.lang.reflect.Method.invoke(Native Method) [CoreUserBean] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(Stateles sSessionContainer.java:472) [CoreUserBean] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSe ssionInstanceInterceptor.java:87) [CoreUserBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133) [CoreUserBean] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:263) [CoreUserBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) [CoreUserBean] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:19 0) [CoreUserBean] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) [CoreUserBean] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav a:271) [CoreUserBean] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI nvoker.java:392) [CoreUserBean] at java.lang.reflect.Method.invoke(Native Method) [CoreUserBean] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) [CoreUserBean] at sun.rmi.transport.Transport$1.run(Transport.java:142) [CoreUserBean] at java.security.AccessController.doPrivileged(Native Method) [CoreUserBean] at sun.rmi.transport.Transport.serviceCall(Transport.java:139) [CoreUserBean] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443) [CoreUserBean] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:6 43) [CoreUserBean] at java.lang.Thread.run(Thread.java:484) |