Hi,
Docx4j crashes when trying to save a document as flat xml. This does not occur when saving in the zipped format. Also, this is specific to docx files that contain the taskpane web extension. I've included an example document as an attachment. Just load it and then save it as flat xml to reproduce this bug.
This can be avoided by adding @XmlRootElement annotations to the following two files:
org.docx4j.com.microsoft.schemas.office.webextensions.taskpanes_2010_11.CTOsfTaskpanes
org.docx4j.com.microsoft.schemas.office.webextensions.webextension_2010_11.CTOsfWebExtension
The docx4j versions ...