3 Replies Latest reply on Aug 3, 2004 11:25 PM by siupetpet

    Activation Error Stateful Session Bean: Activation failure j

    svenbeer

      Hi,

      I'm using jboss3.2.3 and I have run into a error I haven't solved yet and I did not find any useful help at this forum or the web.
      The error occurres if a client (JSP Webapplication) has been idle for some time and starts working again. The passivated Session Bean has been deleted by that time und isn't found by JBoss anymore during activation.

      Why is JBoss deleting the passivated stataful session bean and later tries to open the no longer existing file?
      or: What am I doing wrong? :-)


      So this is my debug log:

      // Passivation starts

      2004-06-02 20:48:08,163 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to passivate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@9021e3
      2004-06-02 20:48:08,163 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Saving session state to: C:\jboss-3.2.3\server\default\tmp\sessions\LoginSession-duzs11tn-3\duzsan0z-6.ser
      2004-06-02 20:48:08,183 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Writing session state: r7.ejb.LoginSessionEJB@13803ba
      2004-06-02 20:48:08,193 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Passivation complete; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@9021e3

      // Passivation has ended

      2004-06-02 20:48:08,193 TRACE [org.jboss.ejb.plugins.StatefulSessionInstancePool] Discard instance:org.jboss.ejb.plugins.StatefulSessionInstancePool@c22978#org.jboss.ejb.StatefulSessionEnterpriseContext@9021e3#null#false#class r7.ejb.LoginSessionEJB

      // After 30 Minutes idle time of the user the passivated
      // Session Beans gets deleted

      2004-06-02 21:13:55,548 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Removing passivated state file: C:\jboss-3.2.3\server\default\tmp\sessions\LoginSession-duzs11tn-3\duzsan0z-6.ser
      2004-06-02 21:13:55,548 TRACE [org.jboss.ejb.plugins.AbstractInstanceCache] Removing from storage bean 'LoginSession' with id = duzsan0z-6


      // After some more time the user turns active again and the
      // Session Beans has to be activated again and the file is not found


      2004-06-02 21:45:51,023 INFO [STDOUT] >> START
      2004-06-02 21:45:51,023 INFO [STDOUT] >> index.jsp has been called

      2004-06-02 21:45:51,073 TRACE [org.jboss.system.Registry] lookup 1090285432=jboss.j2ee:jndiName=risse/ejb/LoginSessionEJB,service=EJB
      2004-06-02 21:45:51,073 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=getUserbyPrimaryKey
      2004-06-02 21:45:51,073 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
      2004-06-02 21:45:51,073 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for getUserbyPrimaryKey
      2004-06-02 21:45:51,073 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
      2004-06-02 21:45:51,073 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=schellepp//5, BranchQual=]
      2004-06-02 21:45:51,073 TRACE [org.jboss.ejb.plugins.StatefulSessionInstancePool] Get instance org.jboss.ejb.plugins.StatefulSessionInstancePool@c22978#0#class r7.ejb.LoginSessionEJB
      2004-06-02 21:45:51,073 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to activate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@3ca56f
      2004-06-02 21:45:51,073 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Reading session state from: C:\jboss-3.2.3\server\default\tmp\sessions\LoginSession-duzs11tn-3\duzsan0z-6.ser
      2004-06-02 21:45:51,073 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
      javax.ejb.EJBException: Could not activate; failed to restore state; CausedByException is:
      C:\jboss-3.2.3\server\default\tmp\sessions\LoginSession-duzs11tn-3\duzsan0z-6.ser
      (Das System kann die angegebene Datei nicht finden)
      // translated: The System could not find the specified file
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:324)
      [...]

      // The file has not been found, JBoss has to be restarted to function
      // properly again



      Any help is appreciated a lot. Thank you.

      Regards,

      Sven