1 Reply Latest reply on Jul 20, 2002 9:58 PM by David Jencks

    Problem in SessionBean passivation

    gurumurthy Newbie

      Hi,

      I have writen a sessionbean which is stateful that access the JCA Adapter.

      Im able to interact to the EIS using the bean and the adapter.

      But im getting an excpetion regularly in JBOSS cosole saying passivation failure ...

      Error Trace
      --------------------------------------------------
      11:42:06,578 INFO [STDOUT] 1757391 [Thread-13] DEBUG org.jboss.ejb.plugins.LRUE
      nterpriseContextCachePolicy - Aging out from cache bean com.vergil.bean.BAPI_CO
      MPANYCODE_GETLIST_Beanwith id = 1026970994218; cache size = 2
      11:42:06,578 INFO [STDOUT] 1757391 [Thread-13] DEBUG org.jboss.ejb.plugins.LRUE
      nterpriseContextCachePolicy - Scheduling for passivation overaged bean com.verg
      il.bean.BAPI_COMPANYCODE_GETLIST_Bean with id = 1026970994219 - Cache size = 1
      11:42:06,578 INFO [STDOUT] 1757391 [Thread-13] DEBUG org.jboss.ejb.plugins.LRUE
      nterpriseContextCachePolicy - Aging out from cache bean com.vergil.bean.BAPI_CO
      MPANYCODE_GETLIST_Beanwith id = 1026970994219; cache size = 1
      11:42:06,593 INFO [STDOUT] 1757406 [EJB Passivator Thread] DEBUG org.jboss.ejb.
      plugins.StatefulSessionFilePersistenceManager - Attempting to passivate; ctx=or
      g.jboss.ejb.StatefulSessionEnterpriseContext@515263
      11:42:06,843 ERROR [Log4jService$ThrowableListenerLoggingAdapter] unhandled thro
      wable
      java.rmi.ServerException: Could not passivate; nested exception is:
      java.io.NotSerializableException: javax.naming.InitialContext
      java.io.NotSerializableException: javax.naming.InitialContext
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
      1827)
      at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
      :480)
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivate
      Session(StatefulSessionFilePersistenceManager.java:288)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Stateful
      SessionInstanceCache.java:78)
      at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanc
      eCache.java:615)
      at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
      at java.lang.Thread.run(Thread.java:484)
      11:42:06,875 INFO [STDOUT] 1757656 [EJB Passivator Thread] ERROR org.jboss.logg
      ing.Log4jService$ThrowableListenerLoggingAdapter - unhandled throwable
      java.rmi.ServerException: Could not passivate; nested exception is:
      java.io.NotSerializableException: javax.naming.InitialContext
      java.io.NotSerializableException: javax.naming.InitialContext
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
      1827)
      at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
      :480)
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivate
      Session(StatefulSessionFilePersistenceManager.java:288)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Stateful
      SessionInstanceCache.java:78)
      at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanc
      eCache.java:615)
      at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
      at java.lang.Thread.run(Thread.java:484)
      11:42:06,906 INFO [STDOUT] 1757719 [EJB Passivator Thread] DEBUG org.jboss.ejb.
      plugins.StatefulSessionFilePersistenceManager - Attempting to passivate; ctx=or
      g.jboss.ejb.StatefulSessionEnterpriseContext@57828d
      11:42:07,062 ERROR [Log4jService$ThrowableListenerLoggingAdapter] unhandled thro
      wable
      java.rmi.ServerException: Could not passivate; nested exception is:
      java.io.NotSerializableException: javax.naming.InitialContext
      java.io.NotSerializableException: javax.naming.InitialContext
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
      1827)
      at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
      :480)
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivate
      Session(StatefulSessionFilePersistenceManager.java:288)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Stateful
      SessionInstanceCache.java:78)
      at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanc
      eCache.java:615)
      at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
      at java.lang.Thread.run(Thread.java:484)
      11:42:07,062 INFO [STDOUT] 1757875 [EJB Passivator Thread] ERROR org.jboss.logg
      ing.Log4jService$ThrowableListenerLoggingAdapter - unhandled throwable
      java.rmi.ServerException: Could not passivate; nested exception is:
      java.io.NotSerializableException: javax.naming.InitialContext
      java.io.NotSerializableException: javax.naming.InitialContext
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
      1827)
      at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
      :480)
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivate
      Session(StatefulSessionFilePersistenceManager.java:288)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(Stateful
      SessionInstanceCache.java:78)
      at org.jboss.ejb.plugins.AbstractInstanceCache$1.execute(AbstractInstanc
      eCache.java:615)
      at org.jboss.util.WorkerQueue$QueueLoop.run(WorkerQueue.java:206)
      at java.lang.Thread.run(Thread.java:484)
      -------------------------------------------------------

      im not able to guess why this problem occurs.

      I doono whther the problem is in my bean or in JBOSS.

      Im using JB0SS-3.0.0 Final Release.

      Kindly help me in solving this problem.

      Thanks,
      Gurumurthy R.