Hi,
We have a strange case using importXHTML. We have a process deployed in websphere where we build a html document and then convert this html to docx. On the server we deploy the following libs:
docx4j-core-8.3.14.jar
docx4j-ImportXHTML-8.3.11.jar
jaxb-runtime-2.3.2.jar
docx4j-JAXB-ReferenceImpl-8.3.14.jar
(with others)
When we run the process we have the exception:
Exception creating document: java.lang.RuntimeException: javax.xml.bind.PropertyException: property "com.sun.xml.bind.namespacePrefixMapper" must be an instance of type com.sun.xml.bind.marshaller.NamespacePrefixMapper, not org.docx4j.jaxb.ri.NamespacePrefixMapper
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:941)
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:857)
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:797)
at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.addParagraphProperties(XHTMLImporterImpl.java:2471)
at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.populatePPr(XHTMLImporterImpl.java:1714)
at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.getPPr(XHTMLImporterImpl.java:1625)
at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.traverseBlockBox(XHTMLImporterImpl.java:1406)
at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.traverse(XHTMLImporterImpl.java:953)
at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.traverse(XHTMLImporterImpl.java:944)
at org.docx4j.convert.in.xhtml.XHTMLImporterImpl.convert(XHTMLImporterImpl.java:746)
We traced the process to check the implementation of some classes:
JAXBContext:: com/ibm/xml/xlxp2/jaxb/JAXBContextImpl.class
Marshall:: com.ibm.xml.xlxp2.jaxb.marshal.MarshallerImpl
The process appears to use the IBM JAXB implementation classes but it indicates REFERENCE in our trace and we don't understand which is the problem.