3 Replies Latest reply on Feb 9, 2011 4:32 PM by Girish Adat

    lazyDeserialization over dynamic ThreadContextClassLoaders

    Girish Adat Newbie

      I am facing following problem while marshalling the contents during a state transfer to a remote node.

       

      2011-01-24 15:19:02,027 ERROR [org.infinispan.util.logging.AbstractLogImpl] Unprocessed Transaction Log Entries! = 95
      2011-01-24 15:19:02,027 ERROR [org.infinispan.remoting.transport.jgroups.JGroupsTransport] Caught while responding to state transfer request
      org.infinispan.statetransfer.StateTransferException: java.net.SocketException: Software caused connection abort: socket write error
          at org.infinispan.statetransfer.StateTransferManagerImpl.generateState(StateTransferManagerImpl.java:171)
          at org.infinispan.remoting.InboundInvocationHandlerImpl.generateState(InboundInvocationHandlerImpl.java:101)
          at org.infinispan.remoting.transport.jgroups.JGroupsTransport.getState(JGroupsTransport.java:564)
          at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:691)
          at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:772)
          at org.jgroups.JChannel.up(JChannel.java:1465)
          at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:954)
          at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:478)
          at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$StateProviderHandler.process(STREAMING_STATE_TRANSFER.java:653)
          at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$StateProviderThreadSpawner$1.run(STREAMING_STATE_TRANSFER.java:582)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)
      Caused by: java.net.SocketException: Software caused connection abort: socket write error
          at java.net.SocketOutputStream.socketWrite0(Native Method)
          at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
          at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
          at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$StreamingOutputStreamWrapper.write(STREAMING_STATE_TRANSFER.java:728)
          at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
          at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
          at org.jboss.marshalling.Marshalling$6.flush(Marshalling.java:386)
          at org.jboss.marshalling.AbstractMarshaller.flush(AbstractMarshaller.java:353)
          at org.jboss.marshalling.AbstractMarshaller.write(AbstractMarshaller.java:121)
          at org.jboss.marshalling.AbstractMarshaller.write(AbstractMarshaller.java:113)
          at org.infinispan.marshall.MarshalledValue$Externalizer.writeObject(MarshalledValue.java:245)
          at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.writeObject(ConstantObjectTable.java:271)
          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:147)
          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:423)
          at org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeObject(ReplicableCommandExternalizer.java:61)
          at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.writeObject(ConstantObjectTable.java:271)
          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:147)
          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:423)
          at org.infinispan.transaction.TransactionLog$LogEntry$Externalizer.writeObject(TransactionLog.java:79)
          at org.infinispan.marshall.jboss.ConstantObjectTable$ExternalizerAdapter.writeObject(ConstantObjectTable.java:271)
          at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:147)
          at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:423)
          at org.infinispan.marshall.jboss.GenericJBossMarshaller.objectToObjectStream(GenericJBossMarshaller.java:99)
          at org.infinispan.marshall.VersionAwareMarshaller.objectToObjectStream(VersionAwareMarshaller.java:146)
          at org.infinispan.transaction.TransactionLog.writeCommitLog(TransactionLog.java:161)
          at org.infinispan.statetransfer.StateTransferManagerImpl.generateTransactionLog(StateTransferManagerImpl.java:189)
          at org.infinispan.statetransfer.StateTransferManagerImpl.generateState(StateTransferManagerImpl.java:161)
          ... 12 more
      Caused by: an exception which occurred:
          in object org.infinispan.marshall.MarshalledValue@6df6f6
          in object org.infinispan.commands.write.PutKeyValueCommand@a09bbcc5
          in object org.infinispan.transaction.TransactionLog$LogEntry@1446745
      

       

      I am facing this error in the node from where the state gets transfered. My application started showing this error since I changed the configuration to perform lazyDeserialization of the data put inside the cache. I am using this as the ThreadContextClassLoader can be different for different threads putting data in Infinispan.

       

      Also, the object I am putting inside the cache are Serializable. And in my case Marshaller / Externalizer impl are not used.

       

      When I used a common ThreadContextClassLoader for all the threads, everything was working perfectly. The changes I made are setting a ThreadContextClassLoader and setting lazyDeserialization as true. Am I missing something else while using these two features? And is it the Marshaller / Externalizer implementation? The cache operations are made by dynamically loaded program modules and the Classes of objects being put are also dynamically loaded. In such a scenario, is Marshaller/Externalizer impls feasible?

       

      Version: ISPN 4.2.0.FINAL