Page 1 of 1

javax.xml.bind.JAXBException: namespacePrefixMapper is null

PostPosted: Tue Jul 23, 2019 6:54 am
by klausT
Hi Jason,

After upgrading to the new version 8.1.1 we get this kind of error:

Code: Select all
java.lang.RuntimeException: javax.xml.bind.JAXBException: namespacePrefixMapper is null
   at org.docx4j.XmlUtils.marshaltoW3CDomDocument(XmlUtils.java:983) ~[docx4j-core-8.1.1.jar:?]
   at org.docx4j.XmlUtils.marshaltoW3CDomDocument(XmlUtils.java:941) ~[docx4j-core-8.1.1.jar:?]
   at org.docx4j.model.datastorage.OpenDoPEIntegrity.process(OpenDoPEIntegrity.java:140) ~[docx4j-core-8.1.1.jar:?]
   at org.docx4j.model.datastorage.OpenDoPEIntegrity.process(OpenDoPEIntegrity.java:116) ~[docx4j-core-8.1.1.jar:?]
   at com.arianim.swingworker.docx.DocxGenerator$1$1.run(DocxGenerator.java:257) [bin/:?]


The full log (with Docx4j log level "WARN" can be found in the attachment.

Interestingly, this only happens when I generate documents in parallel (multi-threaded).
When generating a single document everything works fine.

We are using docx4j-JAXB-Internal-8.1.1.jar and Java runtime 1.8.171

Would be great if you could give us an idea how this can be fixed.

Thanks,
Klaus

Re: javax.xml.bind.JAXBException: namespacePrefixMapper is n

PostPosted: Wed Jul 24, 2019 12:52 pm
by jason
Hi Klaus

Thanks for this. Let me first try to reproduce, then I'll look at how to handle it.

cheers .. Jason

Re: javax.xml.bind.JAXBException: namespacePrefixMapper is n

PostPosted: Thu Jul 25, 2019 5:07 pm
by jason
Fixed by https://github.com/plutext/docx4j/commi ... 205eb473b0

I will release a docx4j 8.1.2 later this week or early next week containing this fix.

Re: javax.xml.bind.JAXBException: namespacePrefixMapper is n

PostPosted: Sat Sep 14, 2019 4:58 am
by nirmalaeee
Hi Jason,
Facing this issue for docx4j-ImportXHTML, please help.

Re: javax.xml.bind.JAXBException: namespacePrefixMapper is n

PostPosted: Mon Sep 16, 2019 7:55 am
by jason
What issue? You mean problems when importing XHTML in parallel?

What docx4j jars are you using?