users@jaxb.java.net

Re: JAXB 1.0.1 Sealing Violation

From: Prashant <prashant_at_pramati.com>
Date: Mon, 12 Dec 2005 10:26:41 +0530

Hi Koshuke,

>>> JAXB RI ver.X can run applications that are developed with JAXB RI
>>> ver.Y as long as X>Y. So you can put jaxb-impl.jar from JAXB 1.0.4,
>>> throw away all JAXB 1.0.1 jars, and it should work.
>>
>>
>> I had tried that too. I copied all the 4 jaxb jars from 1.0.4
>> distribution (jaxb-apis, jaxb-impl, jaxb-libs, and jaxb-xjc) to
>> replace those 4 jars from 1.0.1 version.
>
>
> Mmm, this is really supposed to work.
>
> The error you saw will happen only if
> com/sun/ts/lib/porting/web/jaxb.properties is missing
> "com.sun.xml.bind.jaxbContextImpl" property, but this should have been
> there since 1.0.1 --- can you send us your jaxb.properties?


Yes, your guess is correct. the jaxb.properties at the specified package
does not specify the property "com.sun.xml.bind.jaxbContextImpl".

$ cat com/sun/ts/lib/porting/web/jaxb.properties
#Sun Nov 16 20:50:32 EST 2003
javax.xml.bind.context.factory=com.sun.xml.bind.ContextFactory_1_0_1

I edited this properties file to include the missing property and point
it to DefaultJAXBContextImpl in the impl.runtime package. But this seems
not enough, as I get the same exception.

javax.xml.bind.JAXBException: The specified package
"com.sun.ts.lib.porting.web" is incompatible with the current JAXB runtime.
    at
com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:43)

Any ideas ?

Thanks for your prompt help, I really appreciate it. Meanwhile I am
working on making my classes that are dependent on later version of JAXB
load by a custom classloader.

-Prashant