5 Replies Latest reply on Dec 7, 2010 1:33 PM by Luiz Carlos Silva

    Could not activate; failed to restore state;

    roberto roberto Novice

      I have a my own HttpSessionListener class that create a new stateful session and put the handle in the httpsession.

      After this when a servler or jsp start, the handle is retrieved from the httpsession and use the getEJBObject() to retrieve the stateful session but an exception occurs:

      i have try this with jboss 3.2.5 and 3.2.6RC2 and the error occurs,
      but with jboss 3.2.3 all works fine.!

      this is the trace:
      2004-10-07 11:20:15,869 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: e00pbbi5-4
      2004-10-07 11:20:15,869 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void com.dat.abs.run.ABSHttpSessionEJB.ejbCreate()
      2004-10-07 11:20:15,869 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2004-10-07 11:20:15,909 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=db2admin, password=--hidden--}
      2004-10-07 11:20:16,330 INFO [STDOUT] =[com.dat.abs.web.ABSSessionDestroingListener] T>[handle for ABSHttpSession : org.jboss.proxy.ejb.handle.StatefulHandleImpl@118da51]
      2004-10-07 11:20:17,131 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2004-10-07 11:20:17,141 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to remove; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@812517
      2004-10-07 11:20:17,141 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Removal complete; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@812517
      2004-10-07 11:20:17,141 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to activate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@aa3e9a
      2004-10-07 11:20:17,141 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Reading session state from: D:\jboss-3.2.6RC2\server\default\tmp\sessions\ABSHttpSession-e00pawih-3\e00pbbi5-4.ser
      2004-10-07 11:20:17,141 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
      javax.ejb.EJBException: Could not activate; failed to restore state; CausedByException is:
      D:\jboss-3.2.6RC2\server\default\tmp\sessions\ABSHttpSession-e00pawih-3\e00pbbi5-4.ser (The system cannot find the file specified)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:340)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:99)
      at org.jboss.ejb.plugins.AbstractInstanceCache.doActivate(AbstractInstanceCache.java:384)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.doActivate(StatefulSessionInstanceCache.java:116)
      at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:107)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:205)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:417)
      at org.jboss.ejb.Container.invoke(Container.java:709)
      at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:105)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy718.setAttribute(Unknown Source)
      at com.dat.abs.web.MethodsHelper.removeAttributeFromSession(MethodsHelper.java:1894)
      at com.dat.abs.web.flow.servlet.ABSLoginProcessServlet.clearHttpSessionInfo(ABSLoginProcessServlet.java:207)
      at com.dat.abs.web.flow.servlet.ABSLoginProcessServlet.process(ABSLoginProcessServlet.java:39)
      at com.dat.abs.web.flow.servlet.ABSAbstractBaseServlet.doPost(ABSAbstractBaseServlet.java:84)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:158)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:534)
      java.io.FileNotFoundException: D:\jboss-3.2.6RC2\server\default\tmp\sessions\ABSHttpSession-e00pawih-3\e00pbbi5-4.ser (The system cannot find the file specified)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.(FileInputStream.java:106)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager$FISAction.run(StatefulSessionFilePersistenceManager.java:507)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager$FISAction.open(StatefulSessionFilePersistenceManager.java:516)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:322)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:99)
      at org.jboss.ejb.plugins.AbstractInstanceCache.doActivate(AbstractInstanceCache.java:384)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.doActivate(StatefulSessionInstanceCache.java:116)
      at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:107)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:205)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:417)
      at org.jboss.ejb.Container.invoke(Container.java:709)
      at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:105)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy718.setAttribute(Unknown Source)
      at com.dat.abs.web.MethodsHelper.removeAttributeFromSession(MethodsHelper.java:1894)
      at com.dat.abs.web.flow.servlet.ABSLoginProcessServlet.clearHttpSessionInfo(ABSLoginProcessServlet.java:207)
      at com.dat.abs.web.flow.servlet.ABSLoginProcessServlet.process(ABSLoginProcessServlet.java:39)
      at com.dat.abs.web.flow.servlet.ABSAbstractBaseServlet.doPost(ABSAbstractBaseServlet.java:84)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:158)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:534)
      2004-10-07 11:20:17,151 INFO [STDOUT] =[com.dat.abs.web.MethodsHelper] E>[Could not activate; failed to restore state; CausedByException is:
      D:\jboss-3.2.6RC2\server\default\tmp\sessions\ABSHttpSession-e00pawih-3\e00pbbi5-4.ser (The system cannot find the file specified)]
      2004-10-07 11:20:17,151 INFO [STDOUT] java.rmi.NoSuchObjectException: Could not activate; failed to restore state; CausedByException is:
      D:\jboss-3.2.6RC2\server\default\tmp\sessions\ABSHttpSession-e00pawih-3\e00pbbi5-4.ser (The system cannot find the file specified)


      really the file e00pbbi5-4.ser under the D:\jboss-3.2.6RC2\server\default\tmp\sessions\ABSHttpSession-e00pawih-3 directory doesn't exists

      it's a bug ?

      very important for me....