Aspose.Words for Java 15.6.0 updateFields fails with NPE from WindowsNativeCall

Using Aspose.Words for Java 15.6.0. When running simple document load and then attempting to updateFields receive exception:
Caused by: java.lang.NullPointerException
at com.aspose.words.v3.WindowsNativeCall.(Unknown Source)
at com.aspose.words.v3.WindowsNativeCall.getInstance(Unknown Source)
at com.aspose.words.v3.PrinterMetrics.(Unknown Source)
at com.aspose.words.v3.zzZMV.zzZA9(Unknown Source)
at com.aspose.words.v3.zzZMV.zzZ(Unknown Source)
at com.aspose.words.v3.zzZMV.zzZH(Unknown Source)
at com.aspose.words.v3.zzZMV.zzZAd(Unknown Source)
at com.aspose.words.v3.zzZMV.zzZCs(Unknown Source)
at com.aspose.words.v3.zzZN7.hashCode(Unknown Source)
at com.aspose.words.v3.zzZMV.hashCode(Unknown Source)
at java.util.HashMap.hash(HashMap.java:362)
at java.util.HashMap.put(HashMap.java:492)
at com.aspose.words.v3.zzZMV.zzX(Unknown Source)
at com.aspose.words.v3.zzZ28.zzY(Unknown Source)
at com.aspose.words.v3.zz9S.zz0y(Unknown Source)
at com.aspose.words.v3.zz9S.moveNext(Unknown Source)
at com.aspose.words.v3.zzZPI.zzZ(Unknown Source)
at com.aspose.words.v3.Document.updatePageLayout(Unknown Source)
at com.aspose.words.v3.zz4Z.perform(Unknown Source)
at com.aspose.words.v3.zz50.zzKP(Unknown Source)
at com.aspose.words.v3.zz26.zzZ1(Unknown Source)
at com.aspose.words.v3.zz26.zzZ(Unknown Source)
at com.aspose.words.v3.zz26.zz8(Unknown Source)
at com.aspose.words.v3.Range.updateFields(Unknown Source)
at com.aspose.words.v3.Document.updateFields(Unknown Source)

Code snippet to reproduce the issue:

License license = new License();
license.setLicense(“Aspose.Total.Java.lic”);
Document document = new Document(inputFile);
document.updateFields();
Document to reproduce is attached.
Following environment info is important I think:

NAME="Amazon Linux AMI"
VERSION="2014.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2014.09"
PRETTY_NAME="Amazon Linux AMI 2014.09"

java version "1.7.0_80"
Java™ SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot™ 64-Bit Server VM (build 24.80-b11, mixed mode)

Please note, that issue is not reproduced from windows 8.1. But I find it quite weird that code would attempt to invoke some native windows code, when running on linux.

Hi Andrey,


Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system as WORDSJAVA-1111. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

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


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