Hi All,
I'm using tribes session replication between two Tomcat 7 servers and
getting errors as below. There are various possible causes:
1. The Tomcat versions are different (7.0.4 and 7.0.20)
2. The Java versions are different (1.6.0_22 for i386_and 1.6.0_27 for x64)
3. One server is 32 bit CentOS and the other 64 bit
4. Something else
Obviously, everything should be the same in an ideal world and I should
be on the latest Java and Tomcat versions but if the OS (32 vs 64 bit)
is the problem there is little point me starting the upgrades on the
other stuff as I'll need to replace some tin.
I thought the problem was bound to be the JVM versions being different
and there being a default serialVersionUID somewhere. However I've tried
a few different versions of Tomcat 7 and Java 6 talking to each other in
a sandbox environment and I don't get the errors. This is possibly
because I can't exactly duplicate the various version numbers of the
problem environment in the sandbox.
Interestingly, the errors at each end are exactly the same; both ends of
the cluster link complain of the same incoming serialVersionUID.
Suggestions for locating the problem much appreciated. Also, if there is
a way to log information about the incoming serialized class so I can
figure out which class is the problem.
Cheers
SEVERE: Unable to deserialize
message:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{172,
20, 12, 9}:4000,{172, 20, 12, 9},4000, alive=3408387, securePort=-1, UDP
Port=-1, id={-79 85 122 -111 63 -9 75 88 -88 126 125 -55 80 -79 115 95
}, payload={}, command={}, domain={}, ]; id={109 33 -19 38 45 -50 70 -79
-120 -113 -88 -125 -118 -67 126 34 }; sent=2012-03-09 02:53:23.878]
java.io.InvalidClassException:
org.apache.catalina.ha.session.SessionMessageImpl; local class
incompatible: stream classdesc serialVersionUID = -544811529010945101,
local class serialVersionUID = 1
at
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:568)
at
org.apache.catalina.tribes.io.XByteBuffer.deserialize(XByteBuffer.java:554)
at
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:261)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:113)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84)
at
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:253)
at
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:287)
at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:212)
at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:101)
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:662)