2 Replies Latest reply on Feb 26, 2004 11:56 AM by Xavier MOGHRABI

    Could not passivate

    Xavier MOGHRABI Newbie

      Hello,

      I've build an EJB session stateful which is linked to object that I've defined :

      Here's a illustration of my code :

      public class MyEJBStateful implements SessionBean {
      
       public MyFirstClass object1;
       public MySndClass object2;
      
       public void ejbCreate() {
       this.object1 = new MyFirstClass();
       this.object1 = new MySndClass();
       }
      }
      
      public class MyFirsClass{
       public MyFirsClass(){
       }
       public void services(){
       }
      }
      


      It looks fine except when JBoss passivates the EJB session. Does anybody have and idea ?
      Here is the following error message :

      14:58:21,406 WARN [AbstractInstanceCache] failed to passivate, id=dr4w7xw2-f
      javax.ejb.EJBException: Could not passivate; failed to save state; CausedByExcep
      tion is:
       MyFirsClass
       at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivate
      Session(StatefulSessionFilePersistenceManager.java:378)
       at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Stateful
      SessionInstanceCache.java:85)
       at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractIn
      stanceCache.java:151)
       at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.ru
      n(LRUEnterpriseContextCachePolicy.java:419)
       at java.util.TimerThread.mainLoop(Unknown Source)
       at java.util.TimerThread.run(Unknown Source)
      java.io.NotSerializableException: com.sylob.cochise.ventes.Business.CtrlCompleme
      nterCommande
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
       at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
       at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivate
      Session(StatefulSessionFilePersistenceManager.java:370)
       at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Stateful
      SessionInstanceCache.java:85)
       at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractIn
      stanceCache.java:151)
       at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.ru
      n(LRUEnterpriseContextCachePolicy.java:419)
       at java.util.TimerThread.mainLoop(Unknown Source)
       at java.util.TimerThread.run(Unknown Source)
      14:58:21,437 WARN [AbstractInstanceCache] failed to passivate, id=dr4w8p4i-g
      javax.ejb.EJBException: Could not passivate; failed to save state; CausedByExcep
      tion is:
       com.sylob.cochise.ventes.Business.CtrlComplementerCommande
       at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivate
      Session(StatefulSessionFilePersistenceManager.java:378)
       at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Stateful
      SessionInstanceCache.java:85)
       at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractIn
      stanceCache.java:151)
       at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.ru
      n(LRUEnterpriseContextCachePolicy.java:419)
       at java.util.TimerThread.mainLoop(Unknown Source)
       at java.util.TimerThread.run(Unknown Source)
      java.io.NotSerializableException: com.sylob.cochise.ventes.Business.CtrlCompleme
      nterCommande
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
       at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
       at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
       at java.io.ObjectOutputStream.writeObject0(Unknown Source)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivate
      Session(StatefulSessionFilePersistenceManager.java:370)
       at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Stateful
      SessionInstanceCache.java:85)
       at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractIn
      stanceCache.java:151)
       at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.ru
      n(LRUEnterpriseContextCachePolicy.java:419)
       at java.util.TimerThread.mainLoop(Unknown Source)
       at java.util.TimerThread.run(Unknown Source)
      


      Xavier MOGHRABI