users@jaxb.java.net

Re: Compiling JAXB Samples

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 01 Aug 2003 15:50:28 -0700

TJB <thefox_at_mts.net> wrote:
> Compiling
> file:/A_WSDP_1.2/WSDP-install/jaxb/samples/unmarshal-read/po.xsd
> java.lang.lllegalAccessError: tried to access method
> org.apache.xerces.util.ObjectFactory.findClassLoader()Ljava/lang/
> ClassLoader; from class org.apache.xerces.parsers.XMLGrammarPreparser

This seems to indicate that you have an old version of Xerces and that's
causing the error.

You could either try to find where the old Xerces is coming from (since
you are using IDE, that's where you are getting the old one) or modify
the build script by adding the -nv option (<arg value="-nv".)

The -nv option prevents XJC from using Xerces, so that should get you
going.


FWIW, we've modified our code internally so that XJC works defensively
against Xerces, so the future versions will be free from this trouble.

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