4 Replies Latest reply on May 25, 2007 5:45 AM by Lynn Phang

    Pojo cluster fail

    Lynn Phang Newbie

      when i use jbosscache,it meet a error like this:

      2007-05-24 13:52:19 [org.jboss.cache.marshall.VersionAwareMarshaller]-[ERROR] Unable to read version id from first two bytes of stream, barfing.
      2007-05-24 13:52:19 [org.jboss.cache.CacheImpl.JBossCache-Cluster]-[ERROR] failed setting state
      java.io.EOFException
      at java.io.DataInputStream.readShort(DataInputStream.java:287)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2696)
      at java.io.ObjectInputStream.readShort(ObjectInputStream.java:908)
      at org.jboss.cache.marshall.VersionAwareMarshaller.objectFromObjectStream(VersionAwareMarshaller.java:223)
      at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateAssociatedState(DefaultStateTransferIntegrator.java:116)
      at org.jboss.cache.statetransfer.DefaultStateTransferIntegrator.integrateState(DefaultStateTransferIntegrator.java:63)
      at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTransferManager.java:201)
      at org.jboss.cache.statetransfer.StateTransferManager.setState(StateTransferManager.java:152)
      at org.jboss.cache.CacheImpl$MessageListenerAdaptor.setState(CacheImpl.java:3407)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:667)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:722)
      at org.jgroups.JChannel.up(JChannel.java:1015)
      at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:326)
      at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:509)
      at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$2.run(STREAMING_STATE_TRANSFER.java:674)
      at java.lang.Thread.run(Thread.java:595)


      how can i deal with it?

        • 1. Re: Pojo cluster fail
          Lynn Phang Newbie

          if the second server connect, join in the group,the first server should get this error:

          2007-05-24 14:36:18 [org.jboss.cache.CacheImpl.JBossCache-Cluster]-[ERROR] Caught java.io.NotSerializableException while responding to state transfer request
          java.io.NotSerializableException: java.net.Socket
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
          at java.util.HashMap.writeObject(HashMap.java:1039)
          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:917)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
          at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
          at org.jboss.cache.marshall.NodeData.writeExternal(NodeData.java:71)
          at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:374)
          at org.jboss.cache.marshall.CacheMarshaller200.marshallCollection(CacheMarshaller200.java:466)
          at org.jboss.cache.marshall.CacheMarshaller200.marshallObject(CacheMarshaller200.java:312)
          at org.jboss.cache.marshall.CacheMarshaller200.objectToObjectStream(CacheMarshaller200.java:161)
          at org.jboss.cache.marshall.VersionAwareMarshaller.objectToObjectStream(VersionAwareMarshaller.java:183)
          at org.jboss.cache.statetransfer.DefaultStateTransferGenerator.marshallTransientState(DefaultStateTransferGenerator.java:140)
          at org.jboss.cache.statetransfer.DefaultStateTransferGenerator.generateState(DefaultStateTransferGenerator.java:58)
          at org.jboss.cache.statetransfer.StateTransferManager.getState(StateTransferManager.java:86)
          at org.jboss.cache.CacheImpl$MessageListenerAdaptor.getState(CacheImpl.java:3360)
          at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:653)
          at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:722)
          at org.jgroups.JChannel.up(JChannel.java:1050)
          at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:326)
          at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:509)
          at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$StateProviderHandler.process(STREAMING_STATE_TRANSFER.java:829)
          at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$StateProviderThreadSpawner$1.run(STREAMING_STATE_TRANSFER.java:732)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
          at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$1$1.run(STREAMING_STATE_TRANSFER.java:453)

          i've implemented all my vo Serializable.

          • 2. Re: Pojo cluster fail
            Christophe Lallement Newbie

            Hi Appa

            It's the same pb as describe in my previous post http://www.jboss.com/index.html?module=bb&op=viewtopic&t=109063
            Have you tried to launch your example with jdk 1.5.0_*
            U assume you actually play with a 1.6 release ?

            • 3. Re: Pojo cluster fail
              Lynn Phang Newbie

              no,i am playing with JDK1.5.0_09...

              • 4. Re: Pojo cluster fail
                Lynn Phang Newbie

                i've solved my pb,there is nothing wrong with Jbosscache,it's a nice cache system.