[Spread-users] deserialization problem on unix?

Jonathan Stanton jonathan at cnds.jhu.edu
Wed May 14 19:02:16 EDT 2003


This looks really wierd.

> Ray said...
[charlie:~/workspace/scng][12:28pm]% /usr/java/bin/java -cp ./classes
com.sparta.network.spread.Foo
Press enter------------------------------
    
Sending: charlie.columbia.sparta.com
spread.SpreadException: readObject(): java.lang.ClassNotFoundException:
com.sparta.network.spread.Foo
         at spread.SpreadMessage.getObject(SpreadMessage.java:566)
         at com.sparta.network.spread.Foo.main(Foo.java:62)


> I added a couple lines for a FileOutputStream to dump the Serializable
> object out to a file when it's written to and read from the socket.
> The serialized object from the windows side is identical to what the
> spread connection on the linux side received.  (verified with linux
> 'cmp' command.)  The linux side cannot successfully deserialize the
> object.

If you have a tiny separate program that can read a serialized object
from a file and try to instantiate it. Does that work with the file the
linux machine received? (one would think it would since it is the 'same'
file in bits as the one the Windows machine generated) Does it work if
the linux 'file' is read and instantiated on a windows machine?

>From the network perspective, if Spread is delivering the exact same
bytes as it was given on the sender side, then nothing is wrong with the
internals of Spread. 

Since, as you say, the class can clearly be found since it sends just
fine, is there any lower-level JVM debugging you can enable that will
provide more information about what's failing inside the JVM? 

Jonathan

-- 
-------------------------------------------------------
Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    
-------------------------------------------------------




More information about the Spread-users mailing list