There is a project on Jboss 8 (Java 8), and there was a need to implement a conversion mechanism from DOCX to PDF ... I used Docx4j Docx to fo ... I attach the dependencies "docx4j-JAXB-Internal", "docx4j-export-fo", " JAXBNamespacePrefixMapper ".... But the error" Docx4JException: Exception exporting package, ..... JAXBException: namespacePrefixMapper is null "..... but if you add the dependency" docx4j-JAXB-ReferenceImpl ", then everything works, but it I don’t need it because it draws other dependencies that harm the project!
Tell me please forum users how to fix this problem?
- Code: Select all
Caused by: java.lang.RuntimeException: javax.xml.bind.JAXBException: namespacePrefixMapper is null
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:852)
at org.docx4j.openpackaging.parts.JaxbXmlPart.getXML(JaxbXmlPart.java:250)
at org.docx4j.convert.out.common.Preprocess.process(Preprocess.java:79)
at org.docx4j.convert.out.common.Preprocess.process(Preprocess.java:135)
at org.docx4j.convert.out.common.AbstractWmlExporter.preprocess(AbstractWmlExporter.java:51)
at org.docx4j.convert.out.common.AbstractWmlExporter.preprocess(AbstractWmlExporter.java:32)
at org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:63)
... 80 more
Caused by: javax.xml.bind.JAXBException: namespacePrefixMapper is null
at org.docx4j.jaxb.NamespacePrefixMapperUtils.setProperty(NamespacePrefixMapperUtils.java:164)
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:800)
... 86 more