If a class does not explicitly define a private static final long serialVersionUID in the code it will be autogenerated, and there is no guarantee that different machines will generate the same id; it looks like that is exactly what happened.
Also if the classes are different in any way (using different versions of the class) the autogenerated serialVersionUIDs will also be different.
From the Serializable interface’s docs:
If a serializable class does not explicitly declare a
serialVersionUID, then the serialization runtime will calculate a defaultserialVersionUIDvalue for that class based on various aspects of the class, as described in the Java(TM) Object Serialization Specification. However, it is strongly recommended that all serializable classes explicitly declareserialVersionUIDvalues, since the defaultserialVersionUIDcomputation is highly sensitive to class details that may vary depending on compiler implementations, and can thus result in unexpectedInvalidClassExceptionsduring deserialization. Therefore, to guarantee a consistentserialVersionUIDvalue across different java compiler implementations, a serializable class must declare an explicitserialVersionUIDvalue. It is also strongly advised that explicitserialVersionUIDdeclarations use theprivatemodifier where possible, since such declarations apply only to the immediately declaring class–serialVersionUIDfields are not useful as inherited members. Array classes cannot declare an explicitserialVersionUID, so they always have the default computed value, but the requirement for matchingserialVersionUIDvalues is waived for array classes.
You should define a serialVersionUID in the class definition, e.g.:
class MyClass implements Serializable {
private static final long serialVersionUID = 6529685098267757690L;
...