0 Replies Latest reply on Nov 14, 2008 5:12 PM by sudhindra hs

    javax.ejb.EJBException:Could not passivate; failed to save state when conversation time out happens

    sudhindra hs Newbie
      Here is my action bean where Projectstatus is a simple entity mapped to database table and  EbeExecutor a class which loads some external application logic.

      @Name("projectRisk")
      @Stateful
      @Scope(ScopeType.APPLICATION)
      public class ProjectRiskBean extends EbeExecutor(Projectstatus, Projectstatus) implements IProjectRisk {

          private static final String START_NODE = "Input";
          private static final String MODEL_NAME = "ProjectRisk";

          public ProjectRiskBean() {
              super( MODEL_NAME, START_NODE );
          }

          public void injectCurrentProjectRisk( Projectstatus projectstatus ) {
              // set default risk points to make the concept accessible to the EBE 
              projectstatus.setCurrentrisk( "0" );

              // inject project risk into existing project status ==> inputs = outputs
              List<Projectstatus> inputs = Arrays.asList( new Projectstatus[] { projectstatus } );
              List<Projectstatus> outputs = Arrays.asList( new Projectstatus[] { projectstatus } );

              // execute query
              super.execute( inputs, outputs );
          }

          /* (non-Javadoc)
           * @see com.erudine.dashboard.ebe.IProjectRisk#destroy()
           */
          @Remove
          public void destroy() {
              super.dispose();
          }

      I have a conversation time out set for 4 mintues.

      The Jboss console throws following exception


        16:02:08,159 ERROR [ProjectRiskBean] problem passivation thread
      javax.ejb.EJBException: Could not passivate; failed to save state
              at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:406)
              at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:301)
              at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:209)
      Caused by: java.lang.NullPointerException
              at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:147)
              at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
              at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
              at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
              at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
              at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
              at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
              at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
              at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
              at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
              at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
              at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
              at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
              at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
              at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
              at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
              at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
              at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
              at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
              at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
              at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
              at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
              at org.jboss.serial.io.MarshalledObject.<init>(MarshalledObject.java:51)
              at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:857)
              at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
              at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
              at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
              at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
              at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:390)
              ... 2 more

      i can see that it has got to do something with a serializatio. But i dont understand what is wrong. Can any one please help ?
      Please note i am new to seam :)

      it is happening with seam 2.0.2 and jboss 4.2.3GA