java.lang.NullPointerException at com.aspose.words.WindowsNativeCall.<init>

Hi,

I’m getting this null pointer exception when trying to get the page count of a document:

java.lang.NullPointerException
at com.aspose.words.WindowsNativeCall.(Unknown Source)
at com.aspose.words.WindowsNativeCall.getInstance(Unknown Source)
at com.aspose.words.PrinterMetrics.(Unknown Source)
at com.aspose.words.zzZMV.zzZA9(Unknown Source)
at com.aspose.words.zzZMV.zzZ(Unknown Source)
at com.aspose.words.zzZMV.zzZH(Unknown Source)
at com.aspose.words.zzZMV.zzZAd(Unknown Source)
at com.aspose.words.zzZMV.zzZCs(Unknown Source)
at com.aspose.words.zzZN7.hashCode(Unknown Source)
at com.aspose.words.zzZMV.hashCode(Unknown Source)
at java.util.HashMap.hash(HashMap.java:338)
at java.util.HashMap.get(HashMap.java:556)
at com.aspose.words.zzZMV.zzX(Unknown Source)
at com.aspose.words.zzZ28.zzYr(Unknown Source)
at com.aspose.words.zz9S.zz0V(Unknown Source)
at com.aspose.words.zz9S.moveNext(Unknown Source)
at com.aspose.words.zzZPI.zzZ(Unknown Source)
at com.aspose.words.Document.updatePageLayout(Unknown Source)
at com.aspose.words.Document.zzXK(Unknown Source)
at com.aspose.words.Document.zz2q(Unknown Source)
at com.aspose.words.Document.getPageCount(Unknown Source)

can you please help?

Hi Charles,


Thanks for your inquiry. Please upgrade to latest version (15.6.0) of Aspose.Words from the following link:
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

In case the problem still remains, please attach your input Word document here for testing. We will investigate the issue on our end and provide you more information.

Best regards,

we are already using 15.6.0, unfortunately is not possible for me to provide you with the file

Hi Charles,

Thanks for your inquiry. Unfortunately, it is difficult to say what the problem is without the document and sample source code. We need this document and source code to reproduce the problem on our end.
It is safe to attach files in the forum. If you attach your document here, only you and Aspose staff members can download it. Also you can send the file to my e-mail as described here:
Best regards,

Hi,


We have the same problem, using Aspose.Words 15.6.0 for jdk16. For test cases you can try attached file. Тhe problem is endemic, please help.

Guys, I think you should point out OS, which this code is run on.
I have observed the similar issue, which is not reproduced when code is run on windows OS, but only on linux* OS.
Aspose.Words for Java 15.6.0 updateFields fails with NPE from WindowsNativeCall - Free Support Forum - aspose.com

Then, it seems like critical error that Aspose library depends on OS. Most of Java-based production decisions is running on *nix systems…

Well as I was told Java version of library is simply ported from .Net version. Everyone knows that shit happens… I was just trying to save you time, since from my experience the next question you would be asked from Support is your environment set up. + I was just looking through the recently reported issues to make sure I am not reporting something, that is already nailed in other topic.

Hi Evgeny,

Thank you for reporting this issue to us.

While using the latest version of Aspose.Words for Java i.e. 15.6.0, we managed to reproduce this issue on our end on Linux environment. We have logged this issue in our bug tracking system. The ID of this issue is WORDSJAVA-1112. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

I have same problem…working on linux…

Maybe it has something to do with this new feature introduced by 15.6.0 version:

-> Printer metrics are supported on the Windows platform.

Hope to receive solution soon ! And please tell the call center not to suggest the clients to use latest version on linux…

Thanks, we’ll wait and yet return to 15.5.0, because it doesn’t contain this issue.

Hi,


Thanks for being patient. Our product team is actively working on this issue. We will inform you as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

same error for me. Work in Windows but no in Linux.


java.lang.NullPointerException
at com.aspose.words.WindowsNativeCall.(Unknown Source)

Do you known the release date for this fix ?

Hi Sebastien,

Thanks for your inquiry. We have a good news i.e. our product team has resolved this issue (WORDSJAVA-1112) and they have planned to include the fix to your issue in next 15.7.0 release of Aspose.Words. We will inform you via this thread as soon as a release containing the fix to this issue is published at the end of current week.

Best regards,

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


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

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


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