4 Replies Latest reply on Jun 15, 2005 4:39 AM by bbbear

    JBoss 4.0 sp1 - java.io.NotSerializableException: org.jboss.

    bbbear Newbie

      Hi,

      I don't know if this should be posted here but since the package name has a "mq" in it, thought to ask the expert in this forum. I have this warning all the time after I run my application, I do not understand how this is triggered and made such exception thrown from the UILClientILService class. This warning messages keep appearing from time to time. Do anyone experience this with JBoss 4.0 before? Please share..

      Thanks,

      Regards,
      bb

      11:18:55,521 WARN [AbstractInstanceCache] failed to passivate, id=e9w4izei-l
      javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
      org.jboss.mq.il.uil2.UILClientILService
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:404)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
      at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
      at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)
      java.io.NotSerializableException: org.jboss.mq.il.uil2.UILClientILService
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:395)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
      at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
      at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)
      11:18:55,548 WARN [AbstractInstanceCache] failed to passivate, id=e9w4izks-m
      javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
      org.jboss.mq.il.uil2.UILClientILService
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:404)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
      at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
      at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)
      java.io.NotSerializableException: org.jboss.mq.il.uil2.UILClientILService
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:395)
      at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
      at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
      at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)

        • 1. Re: JBoss 4.0 sp1 - java.io.NotSerializableException
          bbbear Newbie

          Hi,

          Thought to post the whole warning messages instead of part of it. It somehow complains about the log4j logger by the end of the warning message: CausedByException is: org.apache.log4j.Logger

          Any idea? Do let me know if there's already a fix of it, please. I would like much to learn of how to trace better on such case. Thank you.

          Regards,
          bb

          -----------------------------------------------------------------
          11:18:55,521 WARN [AbstractInstanceCache] failed to passivate, id=e9w4izei-l
          javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
          org.jboss.mq.il.uil2.UILClientILService
          at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:404)
          at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
          at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
          at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
          at java.util.TimerThread.mainLoop(Timer.java:512)
          at java.util.TimerThread.run(Timer.java:462)
          java.io.NotSerializableException: org.jboss.mq.il.uil2.UILClientILService
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:395)
          at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
          at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
          at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
          at java.util.TimerThread.mainLoop(Timer.java:512)
          at java.util.TimerThread.run(Timer.java:462)
          11:18:55,548 WARN [AbstractInstanceCache] failed to passivate, id=e9w4izks-m
          javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
          org.jboss.mq.il.uil2.UILClientILService
          at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:404)
          at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
          at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
          at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
          at java.util.TimerThread.mainLoop(Timer.java:512)
          at java.util.TimerThread.run(Timer.java:462)
          java.io.NotSerializableException: org.jboss.mq.il.uil2.UILClientILService
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:395)
          at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
          at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
          at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
          at java.util.TimerThread.mainLoop(Timer.java:512)
          at java.util.TimerThread.run(Timer.java:462)
          11:21:09,013 WARN [AbstractInstanceCache] failed to passivate, id=e9w4jj7r-o
          javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
          org.apache.log4j.Logger
          at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:404)
          at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
          at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
          at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
          at java.util.TimerThread.mainLoop(Timer.java:512)
          at java.util.TimerThread.run(Timer.java:462)
          java.io.NotSerializableException: org.apache.log4j.Logger
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at java.util.HashMap.writeObject(HashMap.java:983)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
          at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:395)
          at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
          at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
          at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
          at java.util.TimerThread.mainLoop(Timer.java:512)
          at java.util.TimerThread.run(Timer.java:462)

          • 2. Re: JBoss 4.0 sp1 - java.io.NotSerializableException: org.jb
            Darran Lofthouse Master

            This should really be discussed in the EJB/JBoss forum as it relates to your implementation of a Stateful session bean.

            If you have a look at section 7.4.1 of the EJB 2.1 specification there is a list of the items that can be referenced by the session bean when it is passivated and serialized.

            Inside the ejbPassivate method you need to clear the references to anything not contained in the list. In the ejbActivate method you can then restore any required reference.

            • 3. Re: JBoss 4.0 sp1 - java.io.NotSerializableException: org.jb
              Elias Ross Master


              Make anything not serializable "transient" in your EJB.

              • 4. Re: JBoss 4.0 sp1 - java.io.NotSerializableException: org.jb
                bbbear Newbie

                Hi,

                I have made all non-serializable object "transient" in my EJBs. However, what confuse me is, the EJBException is not caused by my class. It comes out of no where, look at the warning messages. It says caused by "org.jboss.mq.il.uil2.UILClientILService". Looking at the package name, I assume it is one of the JBoss MQ class. Any idea what may cause this to occur?

                ------------------------------------------------------------------------
                15:59:09,670 WARN [AbstractInstanceCache] failed to passivate, id=e9z9kyfn-l
                javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
                org.jboss.mq.il.uil2.UILClientILService
                at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:404)
                at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
                at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
                at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
                at java.util.TimerThread.mainLoop(Timer.java:512)
                at java.util.TimerThread.run(Timer.java:462)
                java.io.NotSerializableException: org.jboss.mq.il.uil2.UILClientILService
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
                at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
                at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
                at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
                at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
                at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
                at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
                at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
                at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:395)
                at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
                at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
                at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
                at java.util.TimerThread.mainLoop(Timer.java:512)
                at java.util.TimerThread.run(Timer.java:462)
                15:59:09,676 WARN [AbstractInstanceCache] failed to passivate, id=e9z9kyr2-m
                javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is:
                org.jboss.mq.il.uil2.UILClientILService
                at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:404)
                at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
                at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
                at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
                at java.util.TimerThread.mainLoop(Timer.java:512)
                at java.util.TimerThread.run(Timer.java:462)
                java.io.NotSerializableException: org.jboss.mq.il.uil2.UILClientILService
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
                at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
                at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
                at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
                at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
                at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
                at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
                at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
                at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
                at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:395)
                at org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:93)
                at org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:180)
                at org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:419)
                at java.util.TimerThread.mainLoop(Timer.java:512)
                at java.util.TimerThread.run(Timer.java:462)