Page 1 of 1

Docx4J 11.1.2: missing Class NamespacePrefixMapper

PostPosted: Thu Aug 08, 2019 11:10 pm
by klausT
Hi Jason,

When using the new 11.1.2 version, I get the following error message:

Code: Select all
[java.lang.ClassNotFoundException: org.docx4j.jaxb.ri.NamespacePrefixMapper]
   at org.docx4j.XmlUtils.marshaltoW3CDomDocument(XmlUtils.java:983) ~[docx4j-core-11.1.2.jar:?]
   at org.docx4j.XmlUtils.marshaltoW3CDomDocument(XmlUtils.java:941) ~[docx4j-core-11.1.2.jar:?]
   at org.docx4j.model.datastorage.OpenDoPEIntegrity.process(OpenDoPEIntegrity.java:140) ~[docx4j-core-11.1.2.jar:?]
   at org.docx4j.model.datastorage.OpenDoPEIntegrity.process(OpenDoPEIntegrity.java:116) ~[docx4j-core-11.1.2.jar:?]
   at com.arianim.swingworker.docx.DocxGenerator$1$1.run(DocxGenerator.java:257) [bin/:?]


I have checked all the shipped jars but non includes this Class. At least not with this package.

Thanks,
Klaus

Re: Docx4J 11.1.2: missing Class NamespacePrefixMapper

PostPosted: Fri Aug 09, 2019 10:47 am
by jason
Hi Klaus

That class is in https://search.maven.org/artifact/org.d ... 11.1.2/jar

As documented, for 11.x.x, you should add either docx4j-JAXB-ReferenceImpl or docx4j-JAXB-MOXy. Could you please check what you have?

In testing OpenDoPE functionality in 11.1.2 just now, I did find/fix an issue:

https://github.com/plutext/docx4j/commi ... 862cba7c99

so if a resource xslt is not being found in your environment, it is probably this.

cheers .. Jason

Re: Docx4J 11.1.2: missing Class NamespacePrefixMapper

PostPosted: Fri Aug 09, 2019 8:24 pm
by klausT
Hi Jason,

Sorry, for not reading the manual.
After adding docx4j-JAXB-ReferenceImpl everything worked fine.

Thanks,
Klaus