2 Replies Latest reply on Jan 6, 2003 6:21 AM by bernd reiners

    NotSerializableException (InitialContext) at PASSIVATE

    bernd reiners Newbie

      Hi all
      Console Output:
      [Container factory] java.rmi.ServerException: Could not passivate; nested exception is
      [Container factory] java.io.NotSerializableException: javax.naming.InitialContext

      I'm using JBoss Version 2.4.3
      Always when JBoss tries to passivate some of my ejb's that "NotSerializableException" Occurs.

      I dont understand what causes thatError, I tried to declare the Context as transient, but it didn't help (however i think that i dont have to for Context Objects).

      Has anyone seen that before and can help?

      the complete Console Output is:
      [Container factory] java.rmi.ServerException: Could not passivate; nested exception is
      [Container factory] java.io.NotSerializableException: javax.naming.InitialContext



      [Container factory] java.rmi.ServerException: Could not passivate; nested exception is:
      [Container factory] java.io.NotSerializableException: javax.naming.InitialContext
      [Container factory] java.io.NotSerializableException: javax.naming.InitialContext
      [Container factory] at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
      [Container factory] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      [Container factory] at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
      [Container factory] at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
      [Container factory] at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
      [Container factory] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      [Container factory] at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(Sta
      tefulSessionFilePersistenceManager.java:285)
      [Container factory] at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInst
      anceCache.java:67)
      [Container factory] at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCache.java
      :709)
      [Container factory] at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:199)
      [Container factory] at java.lang.Thread.run(Thread.java:484)
      [Container factory] java.rmi.ServerException: Could not passivate; nested exception is:
      [Container factory] java.io.NotSerializableException: javax.naming.InitialContext
      [Container factory] java.io.NotSerializableException: javax.naming.InitialContext
      [Container factory] at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
      [Container factory] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      [Container factory] at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
      [Container factory] at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
      [Container factory] at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
      [Container factory] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      [Container factory] at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(Sta
      tefulSessionFilePersistenceManager.java:285)
      [Container factory] at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInst
      anceCache.java:67)
      [Container factory] at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanceCache.java
      :709)
      [Container factory] at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:199)
      [Container factory] at java.lang.Thread.run(Thread.java:484)