4 Replies Latest reply on Jun 6, 2003 8:53 AM by Adrian Brock

    Activation failure in Stateful bean after thrown Exception

    Mike Toggweiler Newbie

      I'v got an error in one of my Stateful beans and can't figure out.
      In my Stateful Bean with container managed transaction I'm throwing a RuntimeException in the method called 'process'. After several steps in my client I'm rerunning this method with the same Stub again and get the following exception in the console of the jboss server:
      18:39:36,458 DEBUG [StatefulSessionFilePersistenceManager] Reading session state from: /opt/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/sessions/DynamicTextService-dgkz5u9p-3/dgkz8wax-4.ser
      18:39:36,469 DEBUG [AbstractInstanceCache] Activation failure
      javax.ejb.EJBException: Could not activate; failed to restore state; CausedByException is:
      /opt/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/sessions/DynamicTextService-dgkz5u9p-3/dgkz8wax-4.ser (No such file or directory)
      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)

      Is it possible that the session data of a bean is removed after an exception will be thrown? Weather the ejbRemove nor ejbPassivate get called.
      I'm running JBoss version 3.2

      Thanks for your help