2 Replies Latest reply on Aug 16, 2007 10:15 AM by Manik Surtani

    Marshall exception during cache replication

    Guillaume Drot Newbie

      Hi,

      I've got an serialization exception when my object is replicated in the cluster.

      This exception only occurs when replication is called after a put in the cache. For example, if I start the second cache afer the first cache in cluster has been initialized, everything is well replicated at startup without any exceptions.

      I try to serialize my object with java standard serialization and it's working.

      I make sure that the object contains only serializable object.

      I use JBoss server 4.0.5 and JBoss Cache 1.4.0SP1.

      Does anyone know why this type of exception is raised or know how to fix it ?

      Thanks.

      Exception during replication :

      On the server which received the object :

      08:32:20,142 INFO [VersionAwareMarshaller] Caught exception unmarshalling stream with specific versioned marshaller class org.jboss.cache.marshall.Tr
      eeCacheMarshaller140. Attempting to try again with legacy marshaller class org.jboss.cache.marshall.LegacyTreeCacheMarshaller
      08:32:20,147 ERROR [RpcDispatcher] exception=java.io.StreamCorruptedException: invalid stream header
      


      On the server which send the object

      08:32:20,172 INFO [TxInterceptor] There was a problem handling this request
      java.io.StreamCorruptedException: invalid stream header
       at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:753)
       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
       at org.jboss.invocation.MarshalledValueInputStream.<init>(MarshalledValueInputStream.java:74)
       at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:184)
       at org.jgroups.blocks.RpcDispatcher.handle(RpcDispatcher.java:203)
       at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:615)
       at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:512)
       at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:326)
       at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:722)
       at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:554)
       at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:691)
       at java.lang.Thread.run(Thread.java:595)
      





        • 1. Re: Marshall exception during cache replication
          Guillaume Drot Newbie

          I tried to serialize my object vith Jboss serialization and it doesn't work. so i('s a jboss serialization problem.

          java.io.IOException
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:107)
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:269)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
           at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
           at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:163)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333)
           at fr.billetel.interfaces.ws.dispobillet.impl.Dispobillet.prepareEtatCommandesNonRetirees(Dispobillet.java:98)
           at fr.billetel.interfaces.ws.dispobillet.DispobilletMessageReceiverInOut.invokeBusinessLogic(DispobilletMessageReceiverInOut.java:73)
           at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
           at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497)
           at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328)
           at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
           at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
           at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
           at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: java.lang.reflect.InvocationTargetException
           at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103)
           ... 52 more
          Caused by: java.io.IOException: reference 173 not found no readImmutable
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readImmutable(DataContainer.java:775)
           at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:125)
           at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643)
           at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:68)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333)
           at java.util.ArrayList.readObject(ArrayList.java:591)
           ... 56 more
          



          I disable jboss serialization and it works fine now.


          I've got one more question. Does the option "-Dserialization.jboss=false" disable jboss serialization only for jboss cache or for all the application server ?

          thanks.

          • 2. Re: Marshall exception during cache replication
            Manik Surtani Master

             

            I've got one more question. Does the option "-Dserialization.jboss=false" disable jboss serialization only for jboss cache or for all the application server ?


            Just JBoss Cache.