Two stateful EJBs share the same passivation file?
moonrainbow Dec 1, 2003 5:54 PMWe have JBoss 3.2.1-tomcat 4.1.24 combo running on Linux. The problem we see
is: when one instance of stateful EJB fails with EJBException, more often
than not another instance of the same stateful EJB fails with
NoSuchObjectException. We've seen up to 5 different instances fail after the
first failure. And the most interesting thing is - stack traces for all
failed instances refer to the SAME file name. Here's an example.
This thread'd produced an EJBException first and the subsequent call to the
stateful EJB failed with NoSuchObjectException (expected behaviour):
Caused by: java.rmi.NoSuchObjectException: Could not activate; failed to
restore state; CausedByException is:
/home/re/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/sessions/BagEJB-dnlqu6
13-4/dno0r5tp-87d.ser (No such file or directory)
at
org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:1
22)
at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSess
ionInstanceInterceptor.java:212)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:84)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:243)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinde
rInterceptor.java:122)
at
org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContain
er.java:410)
at org.jboss.ejb.Container.invoke(Container.java:674)
at sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat
cher.java:284)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:83)
at
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46
)
at
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at
org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterce
ptor.java:104)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy187.getUserId(Unknown Source)
at com.redenvelope.recs.framework.Locker.makeBag(Locker.java:337)
... 52 more
And then the next call to a DIFFERENT instance of the same stateful EJB
fails with NoSuchObjectException (notice the file name - the same as above)
Caused by: java.rmi.NoSuchObjectException: Could not activate; failed to
restore state; CausedByException is:
/home/re/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/sessions/BagEJB-dnlqu6
13-4/dno0r5tp-87d.ser (No such file or directory)
at
org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:1
22)
at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSess
ionInstanceInterceptor.java:212)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:84)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:243)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinde
rInterceptor.java:122)
at
org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContain
er.java:410)
at org.jboss.ejb.Container.invoke(Container.java:674)
at sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat
cher.java:284)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at
org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:83)
at
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46
)
at
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at
org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterce
ptor.java:104)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy187.getUserId(Unknown Source)
at com.redenvelope.recs.framework.Locker.makeBag(Locker.java:337)
... 52 more
Is this a JBoss bug? How to fix this?