Question

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.

  1. What does this error mean? De-serilization error if any should have come in the first case as well
  2. Is the type of connection i.e. Ad-Hoc a root of the problem?
  3. OR is it due to the code, which includes File Access commands that is causing the problem (then why did it work in the first case)

Thanks for your help!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top