Posted By:
Steve_Mitchell
Posted On:
Thursday, December 29, 2005 12:33 PM
Here is link to a Sun FAQ on
jaxb.properties not found:
LINK TO SUN FAQ ON JAXB.PROPERTIES NOT FOUND
It is a ClassLoader problem. I'm still working through it myself when called from a Servlet (works fine from JUnit).
First, I got a ClassNotFound on an unmarshaller. I did the following to get around that problem:
JAXBContext.newInstance( "blah.blah.blah",
ClassLoader.getSystemClassLoader() );
After the CLassNotFound problem was fixed I got the jaxb.properties not found problem. I tried switching ClassLoaders again, but the ClassNotFound problem came back.
JAXBContext.newInstance( "blah.blah.blah",
Thread.currentThread().getContextClassLoader() );
The FAQ on jaxb.properties not found recommends using this.getClass().getClassLoader()
I cannot use that from the Servlet because it also gives me the ClassNotFound error.
You might try one of these techniques to see if it fixes your issue. I'll keep looking for the solution to my issue.
Steve Mitchell
http://www.byteworksinc.com