users@jaxb.java.net

RE: ClassDefNotFoundError for com/sun/xml/bind/v2/runtime/JAXBContextImpl$JAXBContextBuilder with xjc in Ant

From: KARR, DAVID (ATTSI) <"KARR,>
Date: Sat, 6 Feb 2010 06:03:22 -0800

> -----Original Message-----
> From: Wolfgang Laun [mailto:wolfgang.laun_at_gmail.com]
> Sent: Saturday, February 06, 2010 1:33 AM
> To: users_at_jaxb.dev.java.net
> Subject: Re: ClassDefNotFoundError for
> com/sun/xml/bind/v2/runtime/JAXBContextImpl$JAXBContextBuilder with xjc
> in Ant
>
> JAXB is bundled with JDK 1.6, but not with 1.5.
>
> To run JAXB with 1.5, the JAXB runtime jars must be in the classpath.
> The JAXB release notes say:
> Jars required to deploy a JAXB 2.x client: jaxb-api.jar,
> jaxb-impl.jar, jsr173_1.0_api.jar, activation.jar

Yes, all that is clear, but there are different releases of the JAXB jars. One of them has the JAXBContextBuilder class, and the other does not.

In any case, I believe I've resolved this. The jaxb-ri-20061211 release worked with JDK 1.5. The newer release did not.

> On Fri, Feb 5, 2010 at 8:09 PM, KARR, DAVID (ATTSI) <dk068x_at_att.com>
> wrote:
> > I'm running 1.5.0_19.  I have the JAXB jars, seeming to correspond to
> > version 2.1.5-b01-fcs.  I've constructed a small Ant script that
> > attempts to generate the client jar for a schema (the Soap 1.1
> schema).
> >
> > When I run it, I get the following:
> >
> > java.lang.NoClassDefFoundError:
> > com/sun/xml/bind/v2/runtime/JAXBContextImpl$JAXBContextBuilder
> >        at
> >
> com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getJAXBContext(Bin
> d
> > Info.java:330)
> >        at
> >
> com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl
> $
> > 1.<init>(AnnotationParserFactoryImpl.java:80)
> >
> > This "JAXBContextBuilder" isn't found in the JAXB jars I have.  I
> > searched for it in the JDK 1.5 jars, and it wasn't there.  I did find
> > it, however, in the JDK 1.6 "rt.jar".
> >
> > Do I need a separate set of JAXB jars to use with JDK 1.5?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net