I'm currently experiencing an issue when trying to initialise a jaxb context 
inside a jar dependency inside an axis aar module i.e.

axis.war\WEB-INF\services\myService.aar!\lib\myDependency.jar!\com.mycompany.MyClass.class

I have tested this lib standalone and everything works fine, the jaxb context 
is initialised as expected. However when it is referenced inside an aar module 
inside axis, then the following exception is thrown:

javax.xml.bind.JAXBException: 
"com.mfuse.novo.transactions.adapter.orbis.oxi.generated" doesnt contain 
ObjectFactory.class or jaxb.index
                at 
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:183)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at 
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:128)
                at javax.xml.bind.ContextFinder.find(ContextFinder.java:277)
                at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
                at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
                at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
                at 
com.mfuse.novo.adapters.connections.jaxb.JaxbConnectionImpl.initMarshaller(JaxbConnectionImpl.java:70)
                ... 34 more

I have debugged into the code and attempted to load ObjectFactory manually and 
it appears to be on the classpath. I've also inspected the package inside the 
jar and it contains ObjectFactory.class.

I noticed that axis WEB-INF/lib already contains an earlier version of jaxb, 
which I thought might possibly be causing a conflict here so tried swapping 
these out for the ones that I used in the lib, but this made no difference.

Has anyone else experienced a similar issue?

Regards,

Gavin Ellis





________________________________
The information contained in this message is confidential and is intended for 
the addressee only. Any unauthorised dissemination or copying or use or 
disclosure of information contained herein is strictly prohibited and may be 
illegal. If you are not the named or intended recipient please notify us 
immediately by telephone (+44 207 154 2070) or return e-mail. We have installed 
active virus software but do not accept liability or responsibility for the 
security or reliability of transmission or for any virus transmitted; as such 
you should carry out your own virus checks before opening any attachment.
Mfuse Limited registered in England and Wales, company number 04468412. 
Registered Office: 3rd Floor, Mitre House, 177 Regent Street, London W1B 4JN

Reply via email to