3 Replies Latest reply on Sep 11, 2014 10:02 AM by Amit Kale

    Marshalling Issue

    Amit Kale Newbie

      @

      Hi,

       

      I am migrating my flex application from weblogic to Jboss EAP 6.2.

      My application is using below technologies

      1] Java 1.6

      2] JBOSS EAP 6.2

      3] Flex : flex-messaging-core-3.2.0.3978.jar

       

      I am able to deploy the ear file onto JBOSS EAP in Windows 7 environment. And the application is working fine. But its throwing the below exceptions at the background related to session clustering. I have debugged the code and found that its throwing the error for HTTPFlexSession class. The RiverObjectOutputStream.finish() is throwing this exception. As its finding HTTPSession in the SerializableClass.fields(). Can anybody help me in resolving this error.

       

      [org.infinispan.marshall.VersionAwareMarshaller] (http-/127.0.0.1:8080-2) ISPN000065: Exception while marshalling object: java.io.NotActiveException: Fields were never written

          at org.jboss.marshalling.river.RiverObjectOutputStream.finish(RiverObjectOutputStream.java:175)

          at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1012)

          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:888)

          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:683)

          at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:115)

          at org.jboss.as.clustering.SimpleMarshalledValue.getBytes(SimpleMarshalledValue.java:85)

          at org.jboss.as.clustering.SimpleMarshalledValue.writeExternal(SimpleMarshalledValue.java:175)

          at org.jboss.as.clustering.infinispan.io.ExternalizableExternalizer.writeObject(ExternalizableExternalizer.java:47)

          at org.jboss.as.clustering.infinispan.io.ExternalizableExternalizer.writeObject(ExternalizableExternalizer.java:36)

          at org.infinispan.marshall.jboss.ExternalizerTable$ForeignExternalizerAdapter.writeObject(ExternalizerTable.java:459)

          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:148)

          at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:115)

          at org.infinispan.marshall.MarshallUtil.marshallMap(MarshallUtil.java:59)

          at org.infinispan.marshall.exts.MapExternalizer.writeObject(MapExternalizer.java:63)

          at org.infinispan.marshall.exts.MapExternalizer.writeObject(MapExternalizer.java:47)

          at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.writeObject(ExternalizerTable.java:410)

          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:148)

          at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:115)

          at org.infinispan.atomic.AtomicHashMap$Externalizer.writeObject(AtomicHashMap.java:250)

          at org.infinispan.atomic.AtomicHashMap$Externalizer.writeObject(AtomicHashMap.java:247)

          at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.writeObject(ExternalizerTable.java:410)

          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:148)

          at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:115)

          at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.writeObject(ImmortalCacheEntry.java:154)

          at org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.writeObject(ImmortalCacheEntry.java:150)

          at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.writeObject(ExternalizerTable.java:410)

          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:148)

          at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:115)

          at org.infinispan.loaders.bucket.Bucket$Externalizer.writeObject(Bucket.java:148)

          at org.infinispan.loaders.bucket.Bucket$Externalizer.writeObject(Bucket.java:139)

          at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.writeObject(ExternalizerTable.java:410)

          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:148)

          at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:115)

          at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectToObjectStream(AbstractJBossMarshaller.java:96)

          at org.infinispan.marshall.VersionAwareMarshaller.objectToBuffer(VersionAwareMarshaller.java:92)

          at org.infinispan.marshall.AbstractMarshaller.objectToByteBuffer(AbstractMarshaller.java:94)

          at org.infinispan.marshall.AbstractMarshaller.objectToByteBuffer(AbstractMarshaller.java:84)

          at org.infinispan.marshall.AbstractDelegatingMarshaller.objectToByteBuffer(AbstractDelegatingMarshaller.java:94)

          at org.infinispan.loaders.file.FileCacheStore.updateBucket(FileCacheStore.java:335)

          at org.infinispan.loaders.bucket.BucketBasedCacheStore.insertBucket(BucketBasedCacheStore.java:137)

          at org.infinispan.loaders.bucket.BucketBasedCacheStore.storeLockSafe(BucketBasedCacheStore.java:94)

          at org.infinispan.loaders.bucket.BucketBasedCacheStore.storeLockSafe(BucketBasedCacheStore.java:49)

          at org.infinispan.loaders.LockSupportCacheStore.store(LockSupportCacheStore.java:213)

          at org.infinispan.loaders.AbstractCacheStore.applyModifications(AbstractCacheStore.java:126)

          at org.infinispan.loaders.AbstractCacheStore.commit(AbstractCacheStore.java:163)

          at org.infinispan.interceptors.CacheStoreInterceptor.commitCommand(CacheStoreInterceptor.java:161)

          at org.infinispan.interceptors.CacheStoreInterceptor.visitCommitCommand(CacheStoreInterceptor.java:143)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)

          at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)

          at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:136)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)

          at org.infinispan.interceptors.EntryWrappingInterceptor.visitCommitCommand(EntryWrappingInterceptor.java:116)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)

          at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)

          at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:136)

          at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.visitCommitCommand(AbstractTxLockingInterceptor.java:101)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)

          at org.infinispan.interceptors.NotificationInterceptor.visitCommitCommand(NotificationInterceptor.java:65)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)

          at org.infinispan.interceptors.TxInterceptor.visitCommitCommand(TxInterceptor.java:153)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)

          at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:134)

          at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:136)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)

          at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:128)

          at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:92)

          at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:136)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:120)

          at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:92)

          at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:136)

          at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:60)

          at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:343)

          at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:182)

          at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:81)

          at org.infinispan.transaction.tm.DummyTransaction.notifyAfterCompletion(DummyTransaction.java:285)

          at org.infinispan.transaction.tm.DummyTransaction.runCommitTx(DummyTransaction.java:334)

          at org.infinispan.transaction.tm.DummyTransaction.commit(DummyTransaction.java:91)

          at org.infinispan.transaction.tm.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:102)

          at org.jboss.as.clustering.web.impl.TransactionBatchingManager.endBatch(TransactionBatchingManager.java:75)

          at org.jboss.as.web.session.DistributableSessionManager.processSessionRepl(DistributableSessionManager.java:1571) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.session.DistributableSessionManager.storeSession(DistributableSessionManager.java:872) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:47) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:142) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]

      Caused by: an exception which occurred:

          in object java.util.HashMap@c10fc524

          in object org.jboss.as.clustering.SimpleMarshalledValue@c10fc524

          in object org.infinispan.util.FastCopyHashMap@60365478

          in object org.infinispan.atomic.AtomicHashMap@203e6479

          in object org.infinispan.container.entries.ImmortalCacheEntry@38054cb5

          in object org.infinispan.loaders.bucket.Bucket@36a46bad

        • 1. Re: Marshalling Issue
          Wolf-Dieter Fink Master

          Look like there are classes within the session which are not correct implemented.

          You need to call ObjectOutputStream#defaultWriteObject or ObjectOutputStream#writeFields from the writeObject(OutputStream) first to ensure to store the state.

          • 2. Re: Marshalling Issue
            Amit Kale Newbie

            Hi Fink,

             

            Thanks for your response!!

            All the application specific classes which are used by HTTPFlexSession are implementing the Serializable interface.

             

            About the issue the serialization is done by SerializableClass from JBOSS-marshalling jar.

            While making the HTTPFlexSession as SerializableClass its finding the property

            "private HTTPSession session;"  in the SerializableClass.field[] and due to the same throwing the  below exception

            "Exception while marshalling object: java.io.NotActiveException: Fields were never written"

             

             

             

            Whereas for rest of the fields from HTTPFlexSession its not giving the error.

            Do you mean to say we will have to plugin our own SerializableClass implementation to get rid of this ?

            • 3. Re: Marshalling Issue
              Amit Kale Newbie

              My issue has been resolved when I took the latest JBOSS i.e. JBOSS EAP 6.3.