2 Replies Latest reply on Feb 18, 2003 1:00 PM by Darrel Riekhof

    Stateful session, passivate serialization exception, ArrayLi

    Darrel Riekhof Newbie

      I have a stateful session bean that maintains a List of Serializable helper classes. This List is implemented with an ArrayList. I get exceptions whenever JBoss (3.06) tries to passivate one of my stateful ejbs (see below). I think it is because one of classes that helps out with java.util.ArrayList is not serializable (RandomAccessSubList). Anyone else experienced this and found a workaround?

      ------------------------------------------

      08:52:52,062 ERROR [Log4jService$ThrowableListenerLoggingAdapter] unhandled throwable
      javax.ejb.EJBException: Could not passivate; CausedByException is:
      java.util.RandomAccessSubList
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:294)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:78)
      at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCache.java:616)
      at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
      at java.lang.Thread.run(Thread.java:536)
      java.io.NotSerializableException: java.util.RandomAccessSubList
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:288)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:78)
      at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCache.java:616)
      at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
      at java.lang.Thread.run(Thread.java:536)