users@jaxb.java.net

Re: serial UID mismatch

From: Zhidong Zhao <zzhao_at_CS.UNO.EDU>
Date: Tue, 11 Feb 2003 09:30:12 -0700

This error possibly occurs when you are running jaxb in oracle jvm. Try to use hotspot or classic jvm instead:
java -hotspot blar blar
or java -classic blar blar


>Kathleen DiDomenico wrote:
>
>>hi. When I run
>> JAXBContext jc = JAXBContext.newInstance( "primer.po" );
>>from the tutorial I get the following stackTrace. I have tried it with different xsd files and different packages.
>>
>>Any idea what this is?
>>
>You have two different version of the class
>com.sun.msv.datatype.xsd.XSDatatypeImpl
>that is causing a serialization failure.
>
>Local class not compatible:
>stream classdesc serialVersionUID=-6807414618091372945 (used by XJC
>compiler and in bgm.ser)
>localclass serialVersionUID=3812747094843142778 (version visible from
>application classpath)
>
>One version was used by the xjc binding compiler (that created the
>bgm.ser serialization file )
>and the other version is in the classpath when running your application.
>I suspect that
>you have experimented with MSV (Multi Schema Validator) that is a diffierent
>version of MSV than the one distributed in the beta JAXB RI. Be careful
>with your
>classpath and be sure it consistently points to the same version of the
>class.
>(Sorry, but I don't know offhand which jar file contains the class in
>question in the JAXB RI)
>
>MSV was depending on the computed serial version UID technique rather
>than explicitly setting it. Each subtle change to the MSV classes will
>cause a
>serialization incompatibility.
>This serialization fragility has already been identified and addressed
>so it won't
>be a problem for future versions of MSV and JAXB RI. But in the short
>term until
>you get the next releases of both implementations, you will need to be
>careful setting your classpath.
>
>-Joe Fialli, Sun Microsystems