users@jaxb.java.net

classloaders and jaxb.properties..

From: <Andrew.Ferguson_at_arm.com>
Date: Wed, 12 Nov 2003 16:27:22 +0000

hi,

 I'm currently obtaining a JAXB context with the code below

      jc = JAXBContext.newInstance( "posb.operations.jaxb.wxml",
Thread.currentThread().getContextClassLoader() );

and this works fine when the class runs as-is. My problem is that I've been
trying to jar the whole application (including the .properties files :) and
have it loaded by a custom classloader. Other resources are loading fine
but JAXB is giving an error message:

 javax.xml.bind.JAXBException: javax.xml.bind.JAXBException: Unable to
locate jaxb.properties for package posb.operations.jaxb.wxml

My understanding was that since I'm not setting the context classloader for
the thread in which the code above runs, the context classloader will
default to whichever classloader loaded the class that contains the code
being run (ie the custom classloader). I've tried changing this to

      jc = JAXBContext.newInstance( "posb.operations.jaxb.wxml");

but this doesn't work either.

What mechanism is JAXBContext using to search for jaxb.properties?

thanks,
Andrew
ps. is the JAXB source code available to download?






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net