I have just downloaded v3.2.1 and all dependencies and testing one of the sample program CompareDocuments (src/samples/docx4j/org/docx4j/samples/CompareDocuments.java)
I am getting the following exception
com.topologi.diffx.xml.UndeclaredNamespaceException: The namespace URI "http://schemas.openxmlformats.org/wordprocessingml/2006/main" has not been mapped to any prefix.
at com.topologi.diffx.xml.XMLWriterNSImpl.getQName(XMLWriterNSImpl.java:406)
at com.topologi.diffx.xml.XMLWriterNSImpl.openElement(XMLWriterNSImpl.java:197)
at com.topologi.diffx.event.impl.OpenElementEventNSImpl.toXML(OpenElementEventNSImpl.java:122)
at com.topologi.diffx.format.SmartXMLFormatter.format(SmartXMLFormatter.java:110)
at com.topologi.diffx.Docx4jDriver.formatEventSequence(Docx4jDriver.java:156)
at com.topologi.diffx.Docx4jDriver.diff(Docx4jDriver.java:311)
at org.docx4j.diff.Differencer.diffWorker(Differencer.java:324)
at org.docx4j.diff.Differencer.diff(Differencer.java:302)
at org.docx4j.projects.word.CompareDcouments.main(CompareDcouments.java:101)
java.lang.NullPointerException
at org.docx4j.diff.Differencer.diffWorker(Differencer.java:375)
at org.docx4j.diff.Differencer.diff(Differencer.java:302)
at org.docx4j.projects.word.CompareDcouments.main(CompareDcouments.java:101)
it is failing at line 109: pd.diff(newerBody, olderBody, result, "someone", changeDate,
newerPackage.getMainDocumentPart().getRelationshipsPart(),
olderPackage.getMainDocumentPart().getRelationshipsPart()
any help is appreciated. I did not change any code just trying few sample before using in our project.
thanks in advance.