Hi Experts,
I am trying simple example of variable replace but getting this strange exception
ERROR org.docx4j.jaxb.Context - Cannot initialize context
javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: javax.xml.bind.JAXBException: "org.plutext.jaxb.xmldsig" doesnt contain ObjectFactory.class or jaxb.index
- with linked exception:
[javax.xml.bind.JAXBException: "org.plutext.jaxb.xmldsig" doesnt contain ObjectFactory.class or jaxb.index]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:334)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394)
at org.docx4j.jaxb.Context.<clinit>(Context.java:151)
at org.docx4j.openpackaging.parts.JaxbXmlPart.<init>(JaxbXmlPart.java:85)
at org.docx4j.openpackaging.parts.JaxbXmlPartXPathAware.<init>(JaxbXmlPartXPathAware.java:56)
at org.docx4j.openpackaging.parts.JaxbXmlPartAltChunkHost.<init>(JaxbXmlPartAltChunkHost.java:72)
at org.docx4j.openpackaging.parts.WordprocessingML.DocumentPart.<init>(DocumentPart.java:158)
at org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart.<init>(MainDocumentPart.java:90)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.createPackage(WordprocessingMLPackage.java:378)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.createPackage(WordprocessingMLPackage.java:367)
at com.XXXXXXX.hcpapp.Document.main(Document.java:29)
Caused by: javax.xml.bind.JAXBException: "org.plutext.jaxb.xmldsig" doesnt contain ObjectFactory.class or jaxb.index
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:281)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:172)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
... 12 more
I tried with different version of JAVA but error persists with all of them. Please let me know if anyone has seen this error before ?
Regards,
Akhil