users@jaxb.java.net

Re: Eclipse PDE/RCP - unable to locate jaxb.properties

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 18 May 2005 21:32:05 -0700

Chris Chan wrote:
> I have read through the older archives and search through the web. Now I
> try to modify the newInstace() method.
> jaxbContext = JAXBContext.newInstance("com.dclabs.dcadmin.xml",
> getClass().getClassLoader());

That's the right thing to do.

> This seem to able to find the JAXB.properties, but then it seem that the
> default classloader is been overwritten and it cannot find the other
> classes,
>
> java.lang.NoClassDefFoundError: com/sun/msv/datatype/xsd/XSDatatype
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
> at java.lang.Class.getDeclaredMethod(Unknown Source)
> at java.io.ObjectStreamClass.getPrivateMethod(Unknown Source)
> at java.io.ObjectStreamClass.access$1600(Unknown Source)
> at java.io.ObjectStreamClass$2.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.io.ObjectStreamClass.<init>(Unknown Source)
> at java.io.ObjectStreamClass.lookup(Unknown Source)
> at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)

Make sure you have relevant runtime jars in your plugin. The above class
should be in xsdlib.jar

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com