0 Replies Latest reply on Aug 24, 2006 5:31 AM by x_dev_1231

    Problem with passivation/activation of stateful sessionbean

    x_dev_1231

      Hallo!

      I'm using JBoss 3.2.3 with JDK1.4.
      In our project we use one stateful sessionbean.
      After the passivation of the bean when the bean ist activated the clients gets a "java.rmi.NoSuchObjectException". Even a call over the "javax.ejb.Handle" results in a "java.io.InvalidClassException".

      Here is the full log output:
      Passivation of the sfsb:
      2006-08-24 11:13:20,215 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to passivate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@1ac1adf
      2006-08-24 11:13:20,215 DEBUG [at.gv.brz.revdb.ejb.ejbsession.session.impl.EJBSessionBean] Passivating stateful sessionbean "at.gv.brz.revdb.ejb.ejbsession.session.impl.EJBSessionBean" of user "xy".
      2006-08-24 11:13:20,215 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Saving session state to: D:\jboss3.2.3\server\bi\tmp\sessions\EJBSession-er8wmrzr-3\er8wnkrz-4.ser
      2006-08-24 11:13:20,225 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Writing session state: at.gv.brz.revdb.ejb.ejbsession.session.impl.EJBSessionBean@818805
      2006-08-24 11:13:20,235 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Passivation complete; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@1ac1adf
      2006-08-24 11:13:20,235 TRACE [org.jboss.ejb.plugins.StatefulSessionInstancePool] Discard instance:org.jboss.ejb.plugins.StatefulSessionInstancePool@1c3a0c7#org.jboss.ejb.StatefulSessionEnterpriseContext@1ac1adf#null#false#class at.gv.brz.revdb.ejb.ejbsession.session.impl.EJBSessionBean


      Now when the client makes a new request to the bean over the
      remote object the following is written into the log:

      2006-08-24 11:16:57,528 TRACE [org.jboss.ejb.plugins.StatefulSessionInstancePool] Get instance org.jboss.ejb.plugins.StatefulSessionInstancePool@1c3a0c7#0#class at.gv.brz.revdb.ejb.ejbsession.session.impl.EJBSessionBean
      2006-08-24 11:16:57,528 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to activate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@1fd245f
      2006-08-24 11:16:57,528 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Reading session state from: D:\jboss3.2.3\server\bi\tmp\sessions\EJBSession-er8wmrzr-3\er8wnkrz-4.ser
      2006-08-24 11:16:57,538 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Session state: at.gv.brz.revdb.ejb.ejbsession.session.impl.EJBSessionBean@15e0eab
      2006-08-24 11:16:57,538 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Removing passivated state file: D:\jboss3.2.3\server\bi\tmp\sessions\EJBSession-er8wmrzr-3\er8wnkrz-4.ser
      2006-08-24 11:16:57,538 DEBUG [at.gv.brz.revdb.ejb.ejbsession.session.impl.EJBSessionBean] Activated stateful sessionbean "at.gv.brz.revdb.ejb.ejbsession.session.impl.EJBSessionBean" of user "xy".
      2006-08-24 11:16:57,538 ERROR [at.gv.brz.revdb.util.businessdelegate.ModelBD] Direct call of stateful sessionbean failed: java.rmi.NoSuchObjectException
      .......

      It seems like the bean has gone! But there are no activation errors??? What's wrong with it???
      After the java.io.NoSuchObjectException, the client tries to get the EJBObject (the remote object) over a javax.ejb.Handle which was stored before.
      This leads to the following exception:

      2006-08-24 11:16:57,548 ERROR [at.gv.brz.revdb.util.businessdelegate.ModelBD] Call over handle of stateful sessionbean failed: at.gv.brz.revdb.util.servicelocator.ServiceLocatorException: getService error: unable to examin EJBObject. Exception: java.io.InvalidClassException: org.jboss.util.id.UID; local class incompatible: stream classdesc serialVersionUID = 4588799618105892224, local class serialVersionUID = -8093336932569424512
      at.gv.brz.revdb.util.servicelocator.ServiceLocatorException: getService error: unable to examin EJBObject. Exception: java.io.InvalidClassException: org.jboss.util.id.UID; local class incompatible: stream classdesc serialVersionUID = 4588799618105892224, local class serialVersionUID = -8093336932569424512
      at at.gv.brz.revdb.util.servicelocator.ServiceLocator.getService(ServiceLocator.java:336)
      at at.gv.brz.revdb.util.businessdelegate.ModelBD.sessionCaller(ModelBD.java:249)
      at ....

      I have already checked if all instance variables of the bean are serializable! Only some static class variables are not serializable, but this shouldn't be a problem?
      Please help me with this annoying problem and give me some hints what could be wrong! I'm really stuck of it!!!