6 Replies Latest reply on May 29, 2007 11:50 AM by Ray Glynn

    Initial State Transfer failing.

    Ray Glynn Newbie

      Hi Folks,

      I tried searching through the archives of this forum for an answer to my issue with no success so if someone could help me out it would be great.

      I'm running jboss-cache 1.4.1 sp3 on two servers both running jakarta-tomcat-5.5.9. I have a basic treecache configured on both servers in which I place an ArrayList of a java class containing config information for my frontend (strings, dates, etc.).

      Starting both servers, everything works fine. I can populate the cache and the changes are replicated across the jgroups "cluster".

      The problem occurs when I take down an instance of tomcat and then restart. The current state of the cache is not replicated to the recently added node. I get an initial state transfer error as follows:

      INFO: returning the state for tree rooted in /(4096 bytes)
      May 29, 2007 11:37:02 AM org.jboss.cache.TreeCache viewAccepted
      INFO: viewAccepted(): [16.*.*.*:58177|2] [16.*.*.*:58177]
      May 29, 2007 11:37:20 AM org.jboss.cache.statetransfer.StateTransferGenerator_140 generateStateTransfer
      SEVERE: failed getting the in-memory (transient) state
      java.io.NotSerializableException: com.hp.esso.rstl.tsa.programmatic.AssessmentRequest
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
       at java.util.ArrayList.writeObject(ArrayList.java:578)
       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.writeObject(ObjectOutputStream.java:291)
       at java.util.HashMap.writeObject(HashMap.java:985)
       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.writeObject(ObjectOutputStream.java:291)
       at org.jboss.cache.loader.NodeData.writeExternal(NodeData.java:51)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
       at org.jboss.cache.statetransfer.StateTransferGenerator_140.marshallTransientState(StateTransferGenerator_140.java:204)
       at org.jboss.cache.statetransfer.StateTransferGenerator_140.marshallTransientState(StateTransferGenerator_140.java:212)
       at org.jboss.cache.statetransfer.StateTransferGenerator_140.generateStateTransfer(StateTransferGenerator_140.java:81)
       at org.jboss.cache.TreeCache._getState(TreeCache.java:2691)
       at org.jboss.cache.TreeCache._getState(TreeCache.java:2614)
       at org.jboss.cache.TreeCache$MessageListenerAdaptor.getState(TreeCache.java:5537)
       at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.passUp(MessageDispatcher.java:671)
       at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:363)
       at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
       at org.jgroups.JChannel.up(JChannel.java:1091)
       at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:377)
       at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:393)
       at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
       at org.jgroups.protocols.pbcast.STATE_TRANSFER.requestApplicationStates(STATE_TRANSFER.java:326)
       at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:132)
       at org.jgroups.stack.UpHandler.run(Protocol.java:60)
      


      I've made the class in the ArrayList serializable and everything works fine if the cache is empty the first time it comes up.

      Just a note, I've also tried to set the "FetchStateOnStartup" attribute to false in my configuration file but this does not appear to get picked up. I tested it by outputting the getFetchStateOnStartup() call in my code.

      Either way I want the state fetched on startup!

      Any feedback would be most appreciated,

      Thanks,

      Ray.