Odd serialization problem


Subject: Odd serialization problem
From: John J. Mikucki (jjm7570@cs.rit.edu)
Date: Wed Jul 24 2002 - 05:53:21 MET DST


Hello---

I am having trouble with agent mobility and serialization. Specifically, I
usually (not always) get a 'NoClassDefFoundError' when calling an agent's
doMove() method. The class in question (ns.infra.Tool) exists, is
serializable, compiles and functions correctly, and exists within the
classpath. All containers run in the same environment on the same computer.
In the event that I do not get an exception with the following stack trace,
things operate correctly for 1 or two moves, at which point I get exceptions
from the SLCodec, complaining that an EOF was encountered unexpectedly.

The JADE platform is version 2.6, running under Java 1.4.0-b92, in mixed mode.

Any assistance is appreciated, however I'm specifically interested in what
sorts of things related to agent mobility could cause runtime changes in the
classpath or in the recognized list of classes, or anything else that would
assist me in chasing down the cause of this problem. Perhaps someone more
familiar with the JADE codebase could explain the classes, functions, and
process involved after doMove() is called?

Thanks

John

The stacktrace is:

java.lang.NoClassDefFoundError: ns/infra/Tool
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1613)
at java.lang.Class.getMethod0(Class.java:1732)
at java.lang.Class.getDeclaredMethod(Class.java:1219)
at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1206)
at java.io.ObjectStreamClass.access$1300(ObjectStreamClass.java:45)
at java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:339)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:329)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:249)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1010)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at java.util.LinkedList.writeObject(LinkedList.java:681)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:780)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1294)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at jade.core.RealMobilityManager.handleMove(RealMobilityManager.java:265)
at jade.core.AgentContainerImpl.handleMove(AgentContainerImpl.java:913)
at jade.core.Agent.notifyMove(Agent.java:2163)
at jade.core.Agent.mainLoop(Agent.java:1667)
at jade.core.Agent.run(Agent.java:1511)
at java.lang.Thread.run(Thread.java:536)

 

-- 
Avoision, n:  Avoidance, as practiced in 'Joisey.



This archive was generated by hypermail 2a22 : Wed Jul 24 2002 - 03:52:47 MET DST