Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-659

SFSB throws exception with second passivation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EJB 3.0 RC9 - FD
    • EJB 3.0 RC8 - FD
    • None
    • None
    • High

      I have created a test case to illustrate this for both SimpleStatefulCache and StatefulTreeCache, NestedBeanUnitTestCase (cache and clusteredsession). Basically, if we do this:

      bean.getXXX
      sleep(10000); // to passivate
      bean.getXXX; // to acitvate
      sleep(10000); // to passivate again

      This will produce:

      2006-07-24 04:46:59,358 ERROR [org.jboss.ejb3.cache.simple.SimpleStatefulCache] problem passivation thread^M
      javax.ejb.EJBException: Could not passivate; failed to save state^M
      at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:363)^M
      at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:196)^M
      at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:129)^M
      Caused by: java.lang.NullPointerException^M
      at org.jboss.serial.util.StringUtil.calculateUTFSize(StringUtil.java:319)^M
      at org.jboss.serial.util.StringUtil.saveString(StringUtil.java:63)^M
      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeUTF(DataContainer.java:265)^M
      at org.jboss.ejb3.stateful.StatefulBeanContextReference.writeExternal(StatefulBeanContextReference.java:65)^M
      at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)^M
      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)^M
      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)^M
      at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)^M
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)^M
      at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:347)^M
      ... 2 more^M

      This is caused by a bug from ProxiedStatefuleBeanContext serialization where we dont serialiaze parentRef if it is not null.

              ben.wang_jira Ben Wang (Inactive)
              ben.wang_jira Ben Wang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified