Page 1 of 1

javax.xml.bind.MarshalException when .pptx file is saving

PostPosted: Mon Nov 29, 2010 8:25 pm
by lunoxot
Hello,
I try to save the .pptx file with docx4j 2.6.0 and get the following exception:

javax.xml.bind.MarshalException
- with linked exception:
[com.sun.istack.internal.SAXException2: unable to marshal type "org.docx4j.dml.CTTableStyleList" as an element because it is missing an @XmlRootElement annotation]
:
Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: Failed to add parts from relationships
at org.docx4j.openpackaging.io.SaveToZipFile.addPartsFromRelationships(SaveToZipFile.java:330)
at org.docx4j.openpackaging.io.SaveToZipFile.savePart(SaveToZipFile.java:377)
at org.docx4j.openpackaging.io.SaveToZipFile.addPartsFromRelationships(SaveToZipFile.java:325)
... 4 more
Caused by: org.docx4j.openpackaging.exceptions.Docx4JException: Problem saving part ppt/tableStyles.xml
at org.docx4j.openpackaging.io.SaveToZipFile.saveRawXmlPart(SaveToZipFile.java:258)
at org.docx4j.openpackaging.io.SaveToZipFile.saveRawXmlPart(SaveToZipFile.java:188)
at org.docx4j.openpackaging.io.SaveToZipFile.savePart(SaveToZipFile.java:362)
at org.docx4j.openpackaging.io.SaveToZipFile.addPartsFromRelationships(SaveToZipFile.java:325)
... 6 more

The code is same as in the RoundTripTest sample. With docx4j 2.5.0 this exception doesn't throw.

Re: javax.xml.bind.MarshalException when .pptx file is saving

PostPosted: Mon Nov 29, 2010 10:10 pm
by jason
I've just added the annotation: http://dev.plutext.org/trac/docx4j/changeset/1342

You'll need to checkout the latest svn code to get it.

If this worked in 2.5.0, its possible you'll come across a few other similar instances, since it looks like when I added these prior to the 2.5.0 release, I may not have committed them :-(

hth .. Jason