I have been trying different things with content controls and docx4j. I added/removed couple of controls and now docx4j wont load the document anymore. Getting this error ar runtime.
org.docx4j.openpackaging.exceptions.Docx4JException: Failed to add parts from relationships'
This statement from the 'Getting started' guide caught my eye.
There is a limitation however: the xpath expressions are evaluated against the XML document as it was when first opened in docx4j. You can update the associated XML document once only, by passing true into getJAXBNodesViaXPath. Updating it again (with current JAXB 2.1.x or 2.2.x) will cause an error.
I use docx4j nightly build from apr 2nd and I do use xpath. Could the error be because of this? If so, where does docx4j maintain this information?