Page 1 of 1

Error when trying to save document as flat xml

PostPosted: Thu May 11, 2017 11:35 pm
by Daarx
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 I tried this on was 3.3.3 and last week's master. The bug occurred in both versions.

Just letting you know about the issue. If there's a better way to circumvent the problem, please let me know.

Re: Error when trying to save document as flat xml

PostPosted: Fri May 12, 2017 8:18 pm
by jason
Thanks for this. If you are able to send a pull request containing the 2 annotations, I'll make sure the change is in v3.3.4 beta (due shortly).