Error in jgroups - Version compatibility problems in handlin
vbn77 Aug 11, 2004 3:41 PMhave come across a bug related to version
compatibility. We are using jgroups with jboss-cache.
We recently upgraded to version 2.2.3. However there
are still some machines on our network with an old jgroups
version - 2.2.0. Multicasting between these machines
throws the following error.
- exception=java.io.InvalidClassException:
org.jgroups.stack.IpAddres
s; local class incompatible: stream classdesc
serialVersionUID = -41264592145035
30426, local class serialVersionUID = -
1999612243427863834
at java.io.ObjectStreamClass.initNonProxy
(ObjectStreamClass.java:463)
at java.io.ObjectInputStream.readNonProxyDesc
(ObjectInputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc
(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject
(ObjectInputStream.java:1626)
at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readArray
(ObjectInputStream.java:1603)
at java.io.ObjectInputStream.readObject0
(ObjectInputStream.java:1271)
at java.io.ObjectInputStream.readObject
(ObjectInputStream.java:324)
at org.jgroups.protocols.pbcast.Digest.readExternal
(Digest.java:430)
at
org.jgroups.protocols.pbcast.STABLE$StableHeader.readE
xternal(STABLE.java:512)
at org.jgroups.util.Marshaller.read(Marshaller.java:77)
at org.jgroups.Message.readExternal(Message.java:489)
at org.jgroups.protocols.UDP.handleIncomingUdpPacket
(UDP.java:666)
at org.jgroups.protocols.UDP.run(UDP.java:242)
at java.lang.Thread.run(Thread.java:534)
This is a marshalling error due to a change in classes between versions.
There is a check in org.jgroups.Protocol.UDP.java -> run() (receiving of
multicast packets. There is a call to handle the Incoming Udp Packet using either the incoming packet handler in a different thread or calling handleIncomingUdpPacket() which eventually throws the error. I saw a check for different versions, right before this call. The problem seems to be the above call even though versions are different. I added a check to not handle the incoming packet and discard if there is a version mismatch and things were working fine..
I am also not clear of the implications of making this change as i didn't get any time to follow the exact flow and whether it affects
anything. Is this a valid bug. Will there be a plan to fix. I
am in immediate need of a fix as this message keep
dumping to our console and log - disabling the log is a
solution as this appears to be a harmless error, but is there a cleaner solution.