0 Replies Latest reply on May 12, 2014 4:46 PM by Darrell Wu

    I'm getting a javax.ejb.NoSuchEJBException when the  @Destroy method is called when the  http session times out.

    Darrell Wu Newbie

      Hi,

       

      On our app we are getting javax.ejb.NoSuchEJBException on some stateful session beans  when the http session expires.

      I've set up out stateful session bean to use the simple NoPassivationCache cache.  So the stateful session bean is always kept in memory.

       

      The exact exception  is

      12:02:31,374 ERROR [org.jboss.as.ejb3.invocation] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) JBAS014134: EJB Invocation failed on component NationalAccountQueryAction for method public abstract void com.oneplace.framework.StatefulController.destroy(): javax.ejb.NoSuchEJBException: JBAS014300: Could not find EJB with id {[-78, 0, 118, 115, 7, 90, 74, -18, -101, 126, -33, -115, 34, 89, -127, -118]}
          at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:63) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:315) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:214) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.stateful.StatefulComponentIdInterceptor.processInvocation(StatefulComponentIdInterceptor.java:52) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at com.oneplace.marketing.NationalAccountQuery$$$view33.destroy(Unknown Source) [1place.jar:]
          at sun.reflect.GeneratedMethodAccessor925.invoke(Unknown Source) [:1.7.0_51]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54) [jboss-seam.jar:2.3.1.Final]
          at org.javassist.tmp.java.lang.Object_$$_javassist_seam_43.destroy(Object_$$_javassist_seam_43.java)
          at sun.reflect.GeneratedMethodAccessor2288.invoke(Unknown Source) [:1.7.0_51]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.Component.callComponentMethod(Component.java:2313) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.Component.callDestroyMethod(Component.java:2244) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.Component.destroy(Component.java:1476) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:290) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.contexts.Contexts.destroyConversationContext(Contexts.java:452) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:286) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.contexts.ServletLifecycle.endSession(ServletLifecycle.java:187) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:59) [jboss-seam.jar:2.3.1.Final]
          at org.apache.catalina.session.StandardSession.expire(StandardSession.java:681)
          at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:576)
          at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:382)
          at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:367)
          at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1302)
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1588)
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1600)
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1600)
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1574)
          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
      
      12:02:31,379 WARN  [org.jboss.seam.Component] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Exception calling component @Destroy method: nationalAccountQuery: javax.ejb.NoSuchEJBException: JBAS014300: Could not find EJB with id {[-78, 0, 118, 115, 7, 90, 74, -18, -101, 126, -33, -115, 34, 89, -127, -118]}
          at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:63) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:315) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:214) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ejb3.component.stateful.StatefulComponentIdInterceptor.processInvocation(StatefulComponentIdInterceptor.java:52) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
          at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
          at com.oneplace.marketing.NationalAccountQuery$$$view33.destroy(Unknown Source) [1place.jar:]
          at sun.reflect.GeneratedMethodAccessor925.invoke(Unknown Source) [:1.7.0_51]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54) [jboss-seam.jar:2.3.1.Final]
          at org.javassist.tmp.java.lang.Object_$$_javassist_seam_43.destroy(Object_$$_javassist_seam_43.java)
          at sun.reflect.GeneratedMethodAccessor2288.invoke(Unknown Source) [:1.7.0_51]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.Component.callComponentMethod(Component.java:2313) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.Component.callDestroyMethod(Component.java:2244) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.Component.destroy(Component.java:1476) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:290) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.contexts.Contexts.destroyConversationContext(Contexts.java:452) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.contexts.Lifecycle.endSession(Lifecycle.java:286) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.contexts.ServletLifecycle.endSession(ServletLifecycle.java:187) [jboss-seam.jar:2.3.1.Final]
          at org.jboss.seam.servlet.SeamListener.sessionDestroyed(SeamListener.java:59) [jboss-seam.jar:2.3.1.Final]
          at org.apache.catalina.session.StandardSession.expire(StandardSession.java:681) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:576) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:382) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:367) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1302) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1588) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1600) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1600) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1574) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
      

       

      The NationalAccountQueryAction is a stateful session bean and is a conversation scope bean.

       

      Could this be a memory leak?  or have i missed a setting somewhere?

       

      Thanks