[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [opendocument-users] Error loading an ODP file
HI Afshad, You might have better luck asking this question on the ODFDOM discussion forum at ODFToolkit.org: http://odftoolkit.org/forums/ODFDOM Or there users mailing list: users@odfdom.odftoolkit.org Regards, -Rob Afshad Dinshaw <afshadd@yahoo.com> wrote on 10/27/2009 06:44:41 PM: > > [opendocument-users] Error loading an ODP file > > Is ODFDom v 0.7 unable to read files created by OpenOffice v 3.1 ? > Please note this functionality was working just fine with ODFDom v 0.6.16. > > I created a simple OpenDocument Presentation file using OpenOffice > Impress version 3.1.0. I try to open it in using the following code: > try { > doc = OdfDocument.loadDocument(_inputODPFilePath); > } catch (Exception e) { > String msg = "Failed to load ODF Document at the path:\n" + > _inputODPFilePath; > throw new LgcException(msg, e); > } > > OdfFileDom contentDom; > try { > contentDom = doc.getContentDom(); > } catch (Exception e) { > String msg = "Input ODF Document corrupted.\n" + > "Could not retrieve the content dom."; > throw new LgcException(msg, e); > } > > I get the following exception when it tries to get the content Dom: > Caused by: java.lang.NumberFormatException: For input string: "100%" > at sun.misc.FloatingDecimal.readJavaFormatString > (FloatingDecimal.java:1224) > at java.lang.Double.parseDouble(Double.java:510) > at > org.odftoolkit.odfdom.dom.attribute.svg.SvgStrokeOpacityAttribute.setValue > (SvgStrokeOpacityAttribute.java:95) > at org.odftoolkit.odfdom.doc.OdfDocument > $Handler.startElement(OdfDocument.java:1093) > at org.apache.xerces.parsers.AbstractSAXParser.startElement > (Unknown Source) > at > org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement > (Unknown Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement > (Unknown Source) > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl > $FragmentContentDispatcher.dispatch(Unknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument > (Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse > (Unknown Source) > at org.odftoolkit.odfdom.doc.OdfDocument.getFileDom > (OdfDocument.java:995) > at org.odftoolkit.odfdom.doc.OdfDocument.getContentDom > (OdfDocument.java:624) > Is ODFDom v 0.7 unable to read files created by OpenOffice v 3.1 ? > Please note this functionality was working just fine with ODFDom v 0.6.16. > > Any help on this matter would be greatly appreciated. > Thanks, > Afshad Dinshaw > > [image removed] Yahoo! Canada Toolbar : Search from anywhere on the > web and bookmark your favourite sites. Download it now!
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]