We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ODT with FileCorruptedException (including NullpointerException)


I try to load / convert the attached ODT document.
The ODT document is validated by ODT 1.1 and seems to be correct.
I try the following:
com.aspose.words.Document ad = new com.aspose.words.Document(is);

and get the Stacktrace:

Exception in thread "main" com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
    at com.aspose.words.FileFormatUtil.ëY(Unknown Source)
    at com.aspose.words.Document.ëY(Unknown Source)
    at com.aspose.words.Document.ëZ(Unknown Source)
    at com.aspose.words.Document.<init>(Unknown Source)
    at com.aspose.words.Document.<init>(Unknown Source)
    at com.aspose.words.Document.<init>(Unknown Source)
    at nl.pna.cognitatie.reader.aspose.ConvertDocumentFix.init(ConvertDocumentFix.java:49)
    at nl.pna.cognitatie.reader.aspose.ConvertDocumentFix.getInstance(ConvertDocumentFix.java:40)
    at aspose.AsposeOdtTest.convertFix(AsposeOdtTest.java:37)
    at aspose.AsposeOdtTest.main(AsposeOdtTest.java:24)
Caused by: java.lang.NullPointerException
    at com.aspose.words.ëZUA.ëZ(Unknown Source)
    at com.aspose.words.ëZUA.ëO(Unknown Source)
    at com.aspose.words.ëZUA.ëp(Unknown Source)
    at com.aspose.words.ëZUA.ëZ(Unknown Source)
    at com.aspose.words.ëZSY.ëZ(Unknown Source)
    at com.aspose.words.ëZTT.read(Unknown Source)
    at com.aspose.words.Document.ëY(Unknown Source)
    ... 8 more

I find out, that the problem is in the footer of “style.xml”:

text:note-class="footnote" text:citation-style-name="Footnote_20_symbol"
style:num-format="1" text:start-value="0"
text:start-numbering-at="document" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" />

Can you reproduce the error?
How can I solve the problem?

Kind regards,

Hi there,

Thanks for your inquiry.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10315. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-10315) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.