|
From: Eugene K. <eu...@pl...> - 2006-10-06 15:07:26
|
Hi,
I just dscovered some severe backward incompatibility in Spring 2.0.
When using remoting, especially rmi or ejb remoting, all classes will
be serialized before sent over the wire. Unfortunately that does not
work if client and server are using different versions of Spring jars
and if there are some Spring classes involved.
The problem is that Spring does not specify serialVersionUID for
serializable classes. That is most critical for ApplicationEvent class
and all the exceptions. So, I'd suggest to use serialVersionUID's from
Spring 1.2.8 to all serializable classes and from now on always
explicitly specify that value.
I've attached reports for Spring 1.2.8 and Spring 2.0
regards,
Eugene
PS: one could write a regression test for serialveruids using something
like this:
Class c = Class.forName(name);
ObjectStreamClass objectstreamclass = ObjectStreamClass.lookup(c);
long suid =objectstreamclass.getSerialVersionUID();
...
|