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

Free Support Forum - aspose.com

Unable to instantiate on macOS (1818)

Hi,

I’m trying to instantiate attached word document using the code below and I am getting the following exception:

Caused by: com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
  at com.aspose.words.FileFormatUtil.zzZ(Unknown Source)

   at com.aspose.words.Document.zzY(Unknown Source)

   at com.aspose.words.Document.zzZ(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)

   ... 3 more

Caused by: java.lang.NullPointerException

   at com.aspose.words.zzZ00.zzZmS(Unknown Source)

   at com.aspose.words.zzZ00.zzZmU(Unknown Source)

   at com.aspose.words.zzZ00.zzz4(Unknown Source)

   at com.aspose.words.zz5.zzTX(Unknown Source)

   at com.aspose.words.zz5.zzTY(Unknown Source)

   at com.aspose.words.zzZ00.zzZmY(Unknown Source)

   at com.aspose.words.zzZ00.zzZ(Unknown Source)

   at com.aspose.words.zz99.visitSectionStart(Unknown Source)

   at com.aspose.words.Section.zzZ(Unknown Source)

   at com.aspose.words.CompositeNode.acceptCore(Unknown Source)

   at com.aspose.words.Section.accept(Unknown Source)

   at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)

   at com.aspose.words.CompositeNode.acceptCore(Unknown Source)

   at com.aspose.words.Document.accept(Unknown Source)

   at com.aspose.words.zz99.zzZ(Unknown Source)

   at com.aspose.words.Document.zzY(Unknown Source)

   ... 8 more

code:

String path = "Ari_Esterlos.docx";

Document document = new Document(path);

OS info:
macOS High Sierra 10.13.6 (17G65)

java info:
version “1.8.0_181”
Java™ SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)

aspose.words for java version 17.11

Ari_Esterlos.docx.zip (70.4 KB)


Can you please check this?

Zeljko

@Zeljko

Thanks for your inquiry. We have not found the shared issue while using the latest version of Aspose.Words for Java 18.8. So, please use Aspose.Words for Java 18.8.