Serialization of empty vector over a socket

Mark Wielaard mark@klomp.org
Sun Jul 21 08:53:00 GMT 2002


Hi,

On Fri, 2002-07-19 at 23:51, Robertson, Jason V wrote:
> I've got a simple client-server test case where the server listens on a
> socket, accepts a connection, reads in an object, and prints the object's
> toString() representation.  The client simply opens a port to the server,
> and sends a 'new Vector()'.  The problem is, the server gets a
> NullPointerException in the deserialization process when I compile with gcj
> (from GCC 3.1, Linux).
>  
> I tried debugging a little, but I'm not sure if serialization is broken on
> the client, or deserialization on the server.  Here's the output I get on
> the server-side, followed by the code.  Any ideas?

It seems that our serialization implementation is broken :{
I made a simplified example program from the code you provided
(attached). I tried debugging it a bit and I am not sure where the
NullPointerException comes from. When I link with -static (which gives
nicer stack traces when libgcj is compiled with debugging symbols) then
I get a java.lang.RuntimeException: The SHA algorithm was not found to
use in computing the Serial Version UID for class [Ljava.lang.Object;

I am investigating this further.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SerVector.java
Type: text/x-java
Size: 1043 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20020721/1923b800/attachment.bin>


More information about the Java mailing list