I have written a code for Mobility of an Agent. It works fine with a
Wireless (via Router) Link
But when I created an Ad-Hoc Wireless Connection with my friend's laptop it failed. This is the error I got:
Jan 27, 2012 12:06:37 PM jade.core.mobility.AgentMobilityService$CommandSourceSi
nk handleInformMoved
SEVERE: Error creating agent on destination container. Abort transfer. An I/O er
ror occurred during de-serialization [nested java.io.InvalidClassException: jade
.core.Agent$1; local class incompatible: stream classdesc serialVersionUID = -85
03980205419088695, local class serialVersionUID = -6369687405671300436]
Since the program worked fine with one network connection, it failed with the same source on a different computer and a different connection.
Thanks for your help!
I think the serialized object's serialVersionUID is different from the class on the other JVM. For this give some fixed Long value. If you are using eclipse then add generated serial version ID to every class that implements Serializable. Clean and rebuild the source code. If you are just using command line then do
serialver "AgentClass"
and use the value generated from it and recompile the source code.