Hi,
We are running Aspose 3.2.1.0 inside JBoss 3.2.6, on Sun JVM 1.5.0, on Solaris 9.
Since upgrading to this version of Aspose we sporadically have seen the following error:
Caused by: com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
at com.aspose.words.Document.a(Document.java:1354)
at com.aspose.words.Document.b(Document.java:1341)
at com.aspose.words.Document.a(Document.java:1229)
at com.aspose.words.Document.<init>(Document.java:149)
at com.aspose.words.Document.<init>(Document.java:123)
at mis.pip.edrms.docs.DmDocument.get(DmDocument.java:253)
... 66 more
Caused by: java.lang.IllegalStateException: Current state = CODING_END, new state = CODING
at java.nio.charset.CharsetDecoder.throwIllegalStateException(CharsetDecoder.java:941)
at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:537)
at asposewobfuscated.mf.a(Encoding.java:423)
at asposewobfuscated.tp.jw(BinaryReader.java:165)
at com.aspose.words.eq.n(Parser.java:163)
at com.aspose.words.eq.bo(Parser.java:109)
at com.aspose.words.eq.parse(Parser.java:45)
at com.aspose.words.cl.read(DocReader.java:93)
at com.aspose.words.Document.b(Document.java:1258)
... 70 more
I note from thread https://aspose.com/community/forums/thread/176433/aspose.words-new-document-failure.aspx that something similar has been reported.
In essence our problem is the same - two Document instances for the same Word document are created at roughly the same time. I won’t bog you down with detail just yet but let me know if you want some example code.
If there is a patch for this, please send it on.
Thanks.