> 
> 
> I just downloaded and installed version 1.0.5 and am having a problem
> with RMI.
> 
> I have compiled my java source and generated my stubs and skel classes
> on a Solaris box with Sun's JDK (version 1.1.7). I then moved these
> classes over to a Linux box (Cobalt Raq2, MIPS CPU, RedHat 5.2) and
> start the Kaffe rmiregistry and my RMI server (using the Kaffe VM). When
> 
> I attempt to make a remote call to the RMI server on the kaffe machine I
> 
> get  the following exception:
> 
> java.rmi.UnmarshalException: error unmarshalling return; nested
> exception is: java.io.InvalidClassException:
> TestImpl_Stub; Local class not compatible: stream classdesc
> serialVersionUID=-1585587260594494182 local
> class serialVersionUID=2015510784496417641
> 
> I ran serialver on both the Solaris JDK machine and the Kaffe VM machine
> 
> and I got the following:
> 
> Solaris machine (Sun JDK 1.1.7) - TestImpl_Stub: static final long
> serialVersionUID=2015510784496417641L;
> 
> kaffe machine (Kaffe 1.0.5) - TestImpl_Stub: static final long
> serialVersionUID= -1585587260594494182L; (that's a minus sign in front
> of the big number)
> 
> I know that the class files are the same on both machines because I
> generate them on the Solaris box, tar them up and move them over to the
> Linux box. It looks to me like Kaffe is not correctly reading the
> serialVersionUID on the classes. Is there any way I can fix this or
> workaround it?
> 

You may be able to work around it by inserting a
static final long serialVersionUID=2015510784496417641L;
in your TestImpl_Stub.java file.

However, the problem is most likely not that kaffe can't read the uid---
the problem is that Sun and Kaffe compute the uid differently.
The whole serialVersionUID computation is another big underspecified 
can of worms.  I uid is only "read" if it's given in the file by a
definition like the one above, otherwise, it is computed from the
structure of the class.

We would need TestImpl_Stub.java to debug this (which I don't have the
time to do, but if you post it, maybe someone else will).
Basically, the way I debugged similar problems the last time was by
removing fields/methods from the class until kaffe got the same number
and then adding them back to see just what breaks.

Also... isn't _Stub a generated file?  How are we supposed
to generate matching serialVersionUIDs in this case?
Tim might know.

        - Godmar

Reply via email to