Words - java.lang.NullPointerException

Hello there,



we are using Aspose.Total for Java released on 09-25-2014 on a linux
machine. For most of our conversions it seems to work very well - on few of the documents we try to convert to pdf we get this an exception.




Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at com.aspose.words.zzZRA.zzW(Unknown Source)
at com.aspose.words.zzZR8.zzZ(Unknown Source)
at com.aspose.words.zzZQU.zzZ(Unknown Source)
at com.aspose.words.zzZQH.zzZ(Unknown Source)
at com.aspose.words.zzZR0.zzZ(Unknown Source)
at com.aspose.words.zzZR7.zzZ(Unknown Source)
at com.aspose.words.zzZR6.zzZ(Unknown Source)
at com.aspose.words.zzZQX.zzZ(Unknown Source)
at com.aspose.words.zzZRA.zzV(Unknown Source)
at com.aspose.words.zzZRA.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.zz2O.zzY(Unknown Source)
at com.aspose.words.zz2O.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)
at com.marketlogicsoftware.officeconverter.camel.CamelAsposeTypeConverter.toPdfDataHandler(CamelAsposeTypeConverter.java:741)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1001)
… 42 more
Caused by: java.lang.NullPointerException
at com.aspose.words.zzZE.zzo(Unknown Source)
at com.aspose.words.zzZE.zzY(Unknown Source)
at com.aspose.words.zzZE.zzZ(Unknown Source)
at com.aspose.words.zzZRA.zzZ(Unknown Source)
at com.aspose.words.zzZRA.zzW(Unknown Source)
… 62 more






Code used is not too special:
// update document fields
document.updateFields();
document.updateListLabels();
document.updateTableLayout();
document.updatePageLayout();
document.updateWordCount();

FontSettings.setDefaultFontName(“Droid Sans Fallback”);

File tempFile = File.createTempFile(“mls-temp-”, “.pdf”);
tempFile.deleteOnExit();
com.aspose.words.PdfSaveOptions opts = new com.aspose.words.PdfSaveOptions();
opts.setWarningCallback(new WordsWarningCallback("",""));
document.save(tempFile.getAbsolutePath(), opts);


System environment:

----Java System Properties----------------
java.vm.name: Java HotSpot™ 64-Bit Server VM
java.vm.vendor: Oracle Corporation
java.vm.version: 24.60-b09
java.runtime.name: Java™ SE Runtime Environment
java.runtime.version: 1.7.0_60-b19
os.name: Linux
os.arch: amd64
java.io.tmpdir: /tmp
file.encoding: UTF-8
sun.io.unicode.encoding: UnicodeLittle
sun.cpu.endian: little
Available processors (cores): 8
Free memory (bytes): 3813752616
Maximum memory (bytes): 8572502016
Total memory available to JVM (bytes): 4934348800


Hi Helge,

Thanks for your inquiry. Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.

Issue can be closed - file was corrupt.

Sorry for the troubles.
Helge Rennicke

Hi Helge,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.