users@jaxb.java.net

_at_XmlSchema, package-info and weird classloaders

From: Kenny MacLeod <kennym_at_kizoom.com>
Date: Wed, 04 Oct 2006 20:58:28 +0100

Hi all,

I've been trying to use One-Jar (a utility for bundling several JARs
into one - http://one-jar.sourceforge.net/) to create an application
distribution which includes JAXB RI 2.0.2 and a JAR containing an
XJC-generated schema binding.

There seems to be an issue with how JAXB is detecting the package-info
of the binding. When I run the application "unpacked", everything works
fine, but when part of the One-Jar, JAXB isn't finding the XmlSchema
annotation in package-info, and as a result, the XML it generates has no
namespace.

My question (yes, I do have one) is does JAXB depend on some specific
classloading to find package-info? One-Jar uses a custom classloader,
you see, so it might be interfering.

Is it possible to tell XJC to annotate each and every class with the
namespace, rather than using package-info? Hopefully that will get
around the problem.

cheers
kenny