users@jaxb.java.net

Re: Extending JAXB classes using implClass customization - IncompatibleClassChangeError

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 21 Jul 2003 08:32:56 -0700

Raji Sankar <Raji_Sankar_at_timeinc.com> wrote:
> 7/8/03. I had no problems generating the classes and they compiled. My
> standalone test application had no problems marshalling/unmarshalling
> the extended classes. However, I get IncompatibleClassChangeError at run
> time when I try to unmarshal xml to Java objects in Tomcat server. I

I'm afraid the only reason I can think of is that you have different
versions of the JAXB jar files somewhere. In particular look for
jaxb-impl.jar and jaxb-api.jar

Just to isolate problems, don't put JAXB jar files to common/lib nor the
bootstrap class path. Just add them to your webapp's WEB-INF/lib.


> Here is the stack trace when I try to create a JAXB context using
> JAXB.newInstance(packageName) method:

Try JAXBContext.newInstance(packageName,classLoader) too and see if that
changes anything (or not)

regards,
--
Kohsuke Kawaguchi                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com