users@jaxb.java.net

Re: unable to locate the jaxb.properties file

From: Kedar Bapat <k_bapat_at_YAHOO.COM>
Date: Fri, 30 May 2003 09:46:16 -0600

The jaxb.properties should reside in the same place where it is supposed to as per the documentation...One thing that anybody needs to do when using JAXB in any App Server(J2EE Container) is the following:
Change the way u create the JAXBContext for the related JAXBObject
from:
JAXBContext jCtx = JAXBContext.newInstance("aaa.bbb.ccc");
TO:----->
JAXBContext jCtx = JAXBContext.newInstance("aaa.bbb.ccc", this.getClass().getClassLoader() );

This is becoz if only the first argument is passed the System is unable to determine what ClassLoader is required to load the jaxb.properties file....With the 2nd argument System determines that it has to find this file using the J2EE container's ClassLoader...This would be a common problem for all App Servers and I encourage the authors of JAXB to make it explicitly clear for the developer community as per of the JWSDP tutorial so that they do not waste time in figuring out the solution.....

Regards,
Kedar Bapat
CA, USA