Hi Jason,
We are using docx4j nighty build from 20161130.
So, not a really old version.
One challenge is that I can't reproduce the issue on my side.
But as one of our customers reports this issue there must be a dependency.
Maybe on the Java version, regional setttings, language...
The customer uses Java 1.8.0_74 whereas I use version 1.8.101. All on Windows 7, 64 Bit.
Here is the Stacktrace from the customer:
03.Januar.2017 12:40:26 688904 ERROR [Docx_Generator_iFlow_IF_ZFA_ZE99_STEP2] org.docx4j.model.datastorage.BindingHandler (xpathGetString:339) - Exception executing string-length(/Template[1]/SLD[1]/BusinessSystems[1]/BusinessSystem[1][1]/Products[1]/Product[1][1]/Vendor[1])>0
org.docx4j.openpackaging.exceptions.Docx4JException: Exception executing string-length(/Template[1]/SLD[1]/BusinessSystems[1]/BusinessSystem[1][1]/Products[1]/Product[1][1]/Vendor[1])>0
at org.docx4j.openpackaging.parts.XmlPart.cachedXPathGetString(XmlPart.java:310)
at org.docx4j.openpackaging.parts.CustomXmlDataStoragePart.cachedXPathGetString(CustomXmlDataStoragePart.java:169)
at org.docx4j.model.datastorage.BindingHandler.xpathGetString(BindingHandler.java:323)
at org.opendope.conditions.Xpathref.evaluate(Xpathref.java:87)
at org.opendope.conditions.Condition.evaluate(Condition.java:125)
at org.docx4j.model.datastorage.OpenDoPEHandler.processBindingRoleIfAny(OpenDoPEHandler.java:798)
at org.docx4j.model.datastorage.OpenDoPEHandler.access$100(OpenDoPEHandler.java:81)
at org.docx4j.model.datastorage.OpenDoPEHandler$ShallowTraversor.apply(OpenDoPEHandler.java:668)
at org.docx4j.model.datastorage.OpenDoPEHandler$ShallowTraversor.walkJAXBElements(OpenDoPEHandler.java:714)
at org.docx4j.model.datastorage.OpenDoPEHandler$ShallowTraversor.walkJAXBElements(OpenDoPEHandler.java:730)
at org.docx4j.model.datastorage.OpenDoPEHandler$ShallowTraversor.walkJAXBElements(OpenDoPEHandler.java:730)
at org.docx4j.model.datastorage.OpenDoPEHandler$ShallowTraversor.walkJAXBElements(OpenDoPEHandler.java:730)
at org.docx4j.model.datastorage.OpenDoPEHandler$ShallowTraversor.walkJAXBElements(OpenDoPEHandler.java:730)
at org.docx4j.TraversalUtil.<init>(TraversalUtil.java:214)
at org.docx4j.model.datastorage.OpenDoPEHandler.preprocess(OpenDoPEHandler.java:277)
at com.arianim.swingworker.com8.run(DocxGenerator.java:216)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.xpath.XPathException: #BOOLEAN kann nicht in NodeList konvertiert werden!
at org.apache.xpath.objects.XObject.error(XObject.java:709)
at org.apache.xpath.objects.XObject.nodeset(XObject.java:439)
at org.docx4j.openpackaging.parts.XmlPart.selectNodeIterator(XmlPart.java:427)
at org.docx4j.openpackaging.parts.XmlPart.selectSingleNode(XmlPart.java:400)
at org.docx4j.openpackaging.parts.XmlPart.cachedXPathGetString(XmlPart.java:269)
... 16 more
If it helps to reproduce the problem, I can also sent you the corresponding xml file plus the Docx template.
Regards,
Klaus