bellakhalAmir / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Convert ODT file fails with ClassCastException #361

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
xdocreport-1.0.3 fails to convert ODT file with annotations.
Example of ODT file is attached.

Resulting stacktrace:
org.odftoolkit.odfdom.converter.core.ODFConverterException: 
java.lang.ClassCastException: Insertion of illegal Element: 12
    at org.odftoolkit.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:82)
    at org.odftoolkit.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:43)
    at org.odftoolkit.odfdom.converter.core.AbstractODFConverter.convert(AbstractODFConverter.java:42)
    at com.aca.report.content.ReportContent_JOO.createPDF(ReportContent_JOO.java:130)
    at com.aca.report.content.ReportContent_JOO.getBytes(ReportContent_JOO.java:90)
    at com.aca.report.viewer.PDFRendererAdapter.<init>(PDFRendererAdapter.java:30)
    at com.aca.report.viewer.ViewerPanel.loadReport(ViewerPanel.java:391)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser.loadReport(XMDIPanel_ReportBrowser.java:574)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser.access$9(XMDIPanel_ReportBrowser.java:566)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser$21.run(XMDIPanel_ReportBrowser.java:556)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1082)
    at java.awt.Component.show(Component.java:1651)
    at java.awt.Component.setVisible(Component.java:1603)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1005)
    at org.jsphere.swing.dialogs.ErrorDialog.init(ErrorDialog.java:120)
    at org.jsphere.swing.dialogs.ErrorDialog.<init>(ErrorDialog.java:107)
    at org.jsphere.swing.dialogs.ErrorDialog.handleException(ErrorDialog.java:84)
    at org.jsphere.swing.panels.Desktop.handleException(Desktop.java:221)
    at com.aca.report.viewer.PDFRendererAdapter.<init>(PDFRendererAdapter.java:35)
    at com.aca.report.viewer.ViewerPanel.loadReport(ViewerPanel.java:391)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser.loadReport(XMDIPanel_ReportBrowser.java:574)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser.access$9(XMDIPanel_ReportBrowser.java:566)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser$21.run(XMDIPanel_ReportBrowser.java:556)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1082)
    at java.awt.Component.show(Component.java:1651)
    at java.awt.Component.setVisible(Component.java:1603)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1005)
    at org.jsphere.swing.dialogs.ErrorDialog.init(ErrorDialog.java:120)
    at org.jsphere.swing.dialogs.ErrorDialog.<init>(ErrorDialog.java:107)
    at org.jsphere.swing.dialogs.ErrorDialog.handleException(ErrorDialog.java:84)
    at org.jsphere.swing.panels.Desktop.handleException(Desktop.java:221)
    at com.aca.report.viewer.PDFRendererAdapter.<init>(PDFRendererAdapter.java:35)
    at com.aca.report.viewer.ViewerPanel.loadReport(ViewerPanel.java:391)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser.loadReport(XMDIPanel_ReportBrowser.java:574)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser.access$9(XMDIPanel_ReportBrowser.java:566)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser$21.run(XMDIPanel_ReportBrowser.java:556)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1082)
    at java.awt.Component.show(Component.java:1651)
    at java.awt.Component.setVisible(Component.java:1603)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1005)
    at org.jsphere.swing.dialogs.ErrorDialog.init(ErrorDialog.java:120)
    at org.jsphere.swing.dialogs.ErrorDialog.<init>(ErrorDialog.java:107)
    at org.jsphere.swing.dialogs.ErrorDialog.handleException(ErrorDialog.java:84)
    at org.jsphere.swing.panels.Desktop.handleException(Desktop.java:221)
    at com.aca.report.viewer.PDFRendererAdapter.<init>(PDFRendererAdapter.java:35)
    at com.aca.report.viewer.ViewerPanel.loadReport(ViewerPanel.java:391)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser.loadReport(XMDIPanel_ReportBrowser.java:574)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser.access$9(XMDIPanel_ReportBrowser.java:566)
    at com.aca.report.viewer.XMDIPanel_ReportBrowser$21.run(XMDIPanel_ReportBrowser.java:556)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.ClassCastException: Insertion of illegal Element: 12
    at com.lowagie.text.Phrase.add(Unknown Source)
    at org.odftoolkit.odfdom.converter.pdf.internal.stylable.StylablePhrase.addElement(StylablePhrase.java:58)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:829)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:817)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.processParagraphOrHeading(ElementVisitorForIText.java:382)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.visit(ElementVisitorForIText.java:320)
    at org.odftoolkit.odfdom.dom.element.text.TextPElement.accept(TextPElement.java:1681)
    at org.odftoolkit.odfdom.converter.core.ElementVisitorConverter.visit(ElementVisitorConverter.java:82)
    at org.odftoolkit.odfdom.dom.DefaultElementVisitor.visit(DefaultElementVisitor.java:4653)
    at org.odftoolkit.odfdom.dom.element.text.TextNoteBodyElement.accept(TextNoteBodyElement.java:538)
    at org.odftoolkit.odfdom.converter.core.ElementVisitorConverter.visit(ElementVisitorConverter.java:82)
    at org.odftoolkit.odfdom.dom.DefaultElementVisitor.visit(DefaultElementVisitor.java:4645)
    at org.odftoolkit.odfdom.dom.element.text.TextNoteElement.accept(TextNoteElement.java:144)
    at org.odftoolkit.odfdom.converter.core.ElementVisitorConverter.visit(ElementVisitorConverter.java:82)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:826)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:817)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.visit(ElementVisitorForIText.java:426)
    at org.odftoolkit.odfdom.dom.element.text.TextSpanElement.accept(TextSpanElement.java:1731)
    at org.odftoolkit.odfdom.converter.core.ElementVisitorConverter.visit(ElementVisitorConverter.java:82)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:826)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.addITextContainer(ElementVisitorForIText.java:817)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.processParagraphOrHeading(ElementVisitorForIText.java:382)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.visit(ElementVisitorForIText.java:320)
    at org.odftoolkit.odfdom.dom.element.text.TextPElement.accept(TextPElement.java:1681)
    at org.odftoolkit.odfdom.converter.core.ElementVisitorConverter.visit(ElementVisitorConverter.java:82)
    at org.odftoolkit.odfdom.dom.DefaultElementVisitor.visit(DefaultElementVisitor.java:2605)
    at org.odftoolkit.odfdom.converter.pdf.internal.ElementVisitorForIText.visit(ElementVisitorForIText.java:253)
    at org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.accept(OfficeTextElement.java:805)
    at org.odftoolkit.odfdom.converter.pdf.PdfConverter.processBody(PdfConverter.java:126)
    at org.odftoolkit.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:65)
    ... 110 more

Original issue reported on code.google.com by michalek...@gmail.com on 29 Jan 2014 at 10:39

Attachments:

GoogleCodeExporter commented 8 years ago
Thank's for your attached odt. Leszek do you think it's possible for you to see 
the problem? Thank's for your help.

Original comment by angelo.z...@gmail.com on 29 Jan 2014 at 12:13