When I run this sample against a powerpoint with a single slide that has an embedded chart, I get the following:
Exception in thread "main" java.lang.RuntimeException: javax.xml.bind.MarshalException
- with linked exception:
[com.sun.istack.internal.SAXException2: unable to marshal type "org.pptx4j.pml.CTGraphicalObjectFrame" as an element because it is missing an @XmlRootElement annotation]
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:438)
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:362)
at test.pptx.Traverse$1.apply(Traverse.java:44)
at test.pptx.Traverse$1.walkJAXBElements(Traverse.java:81)
at org.docx4j.TraversalUtil.<init>(TraversalUtil.java:150)
at test.pptx.Traverse.main(Traverse.java:33)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[com.sun.istack.internal.SAXException2: unable to marshal type "org.pptx4j.pml.CTGraphicalObjectFrame" as an element because it is missing an @XmlRootElement annotation]
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(Unknown Source)
at org.docx4j.XmlUtils.marshaltoString(XmlUtils.java:426)
... 5 more
Caused by: com.sun.istack.internal.SAXException2: unable to marshal type "org.pptx4j.pml.CTGraphicalObjectFrame" as an element because it is missing an @XmlRootElement annotation
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(Unknown Source)
... 9 more
Am I doing something incorrectly? The traverse runs fine if I delete the chart from the slide...
Thanks,
Rob