EntityHome.persist results in "could not find stateful bean"
rituraj_tiwari Sep 10, 2008 8:37 PMWe are running into this really strange problem. When we invoke persist() on an Entityhome subclass, it throws
javax.ejb.NoSuchEJBException: Could not find stateful bean: 5c4o16-11mvaf-fkozz2f7-1-fkp0k9nr-16
Which is odd because it happens pretty much moments after a session is started and clearly, no stateful bean has had the opportunity to timeout.
Here is another twist: This call happens as part of a seam remoting invocation. Interestingly, everything was working fine when our client did JavaScript-based seam remoting. We recently rewrote our client in Flex and started using Flamingo. Now suddenly we are seeing this problem.
Any idea what might be going wrong?
Here is a partial stack trace:
[org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:390) org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375) org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206) org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119) $Proxy182.registerSynchronization(Unknown Source) sun.reflect.GeneratedMethodAccessor304.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.jboss.seam.util.Reflections.invoke(Reflections.java:21) org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31) org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76) org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54) org.javassist.tmp.java.lang.Object_$$_javassist_1.registerSynchronization(Object_$$_javassist_1.java) org.jboss.seam.transaction.UTTransaction.registerSynchronization(UTTransaction.java:92) org.jboss.seam.async.AbstractDispatcher.scheduleTransactionSuccessEvent(AbstractDispatcher.java:38) sun.reflect.GeneratedMethodAccessor351.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.jboss.seam.util.Reflections.invoke(Reflections.java:21) org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166) org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102) org.jboss.seam.async.ThreadPoolDispatcher_$$_javassist_8.scheduleTransactionSuccessEvent(ThreadPoolDispatcher_$$_javassist_8.java) org.jboss.seam.core.Events.raiseTransactionSuccessEvent(Events.java:125) org.jboss.seam.framework.Controller.raiseTransactionSuccessEvent(Controller.java:258) org.jboss.seam.framework.Home.raiseAfterTransactionSuccessEvent(Home.java:443) org.jboss.seam.framework.EntityHome.persist(EntityHome.java:88) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.jboss.seam.util.Reflections.invoke(Reflections.java:21) org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:48) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38) org.jboss.seam.util.Work.workInTransaction(Work.java:40) org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42) org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166) org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102) com.sharon.session.DataAccessorRootHome_$$_javassist_9.persist(DataAccessorRootHome_$$_javassist_9.java) com.sharon.util.datasources.WebFileSource.createAccessorRoot(WebFileSource.java:938) ...