RE: [jade-develop] Odd serialization problem


Subject: RE: [jade-develop] Odd serialization problem
From: Bellifemine Fabio (Fabio.Bellifemine@TILAB.COM)
Date: Wed Jul 24 2002 - 10:22:51 MET DST


John, check that your class is not referenced by name, I mean: if you
had a Class.forName() call, then it would be reasonable (and even
correct) that your class is not serialized.

        -----Original Message-----
        From: John J. Mikucki
        Sent: Wed 24/07/2002 05:53
        To: jade-develop@sharon.cselt.it
        Cc:
        Subject: [jade-develop] Odd serialization problem
        
        

        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:13
30)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1
245)
        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.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.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:1
245)
        at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
        at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13
30)
        at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1
245)
        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.
        _______________________________________________
        jade-develop mailing list
        jade-develop@sharon.cselt.it
        http://sharon.cselt.it/mailman/listinfo/jade-develop
        UNSUBSCRIBE INSTRUCTIONS AT
http://jade.cselt.it/mailing.htm#unsubscribe

====================================================================
CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons
above and may contain confidential information. If you have received
the message in error, be informed that any use of the content hereof
is prohibited. Please return it immediately to the sender and delete
the message. Should you have any questions, please contact us by
replying to MailAdmin@tilab.com. Thank you
====================================================================



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