When trying to create a new JAXB instance inside a servlet I am getting a JAXBException saying the jaxb.properties cannot be found. I have been trying to explicitly pass the classloader with the call to JAXBContext.newInstance() but I cannot figure it out.
Here are the class loaders:
servlet classloader: oc4j:10.1.3
servlet parent classloader: api:1.4.0
this classloader: RestTest.web.ExampleWebApp:0.0.0
this classloader parent: RestTest.root:0.0.0
The JAXB generated classes are in a different package, so my servlet is in package "com.xyz.ws" and the JAXB classes are in package "com.abc.123". I am creating the new JAXB instance from the servlet with `
JAXBContext.newInstance("com.abc.123", servletClassLoader)
(I also tried using this.getClass().getClassLoader()
)