1 Reply Latest reply on Apr 11, 2004 9:52 AM by Huafu Wu

    Stateful Bean Couldnot activate; failed to restore state;Fil

    Huafu Wu Newbie

      Hello everyone
      Help me pls!
      I have a stateful session bean, and I don't want jboss container to passive it,so I update standardjboss.xml just like following:
      "...
      <cache-policy>org.jboss.ejb.plugins.NoPassivationCachePolicy</cache-policy>
      ..."
      Sometimes ,maybe after a long-time run, exceptions occured,whether I deployed it on JBoss-2.4.1_Tomcat-3.2.3 or Jboss 3.2.1 :

      javax.ejb.EJBException: Could not activate; failed to restore state; CausedByException is:

      C:\BI.Office\Server\jboss-3.2.1\server\default\tmp\sessions\BiOfficeServer-dsssc4ah-3\dsst8q4a-9.ser

      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:324)

      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:90)

      at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:113)

      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:212)

      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
      ......
      (StatefulSessionInterceptor.java:104)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy39.remove(Unknown Source)

      java.io.FileNotFoundException: C:\BI.Office\Server\jboss-3.2.1\server\default\tmp\sessions\BiOfficeServer-dsssc4ah-3\dsst8q4a-9.ser

      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.(FileInputStream.java:106)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:308)

      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:90)

      at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:113)

      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.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(ProxyFactoryFinderInterceptor.java:122)

      at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:410)

      And I'm sure ,there is no Runtime Exception being thrown in my program.