Hi,
We are from Nuix who is also one of the Aspose customers.
We encountered the issue as described in the title and it is easy to reproduce (the version we are using is 19.10 pdf). We attached a normal XPS file.test.zip (41.2 KB)
- Create a fresh project from IDEA
- Create a class and its main method contains following code:
try
{
LoadOptions options = new XpsLoadOptions();
IDocument doc = new Document((InputStream)(new FileInputStream(new File(“C:\test.xps”))), options);
doc.getPages();
}
catch(Exception e)
{
System.out.println(e);
}
-
Open IDEA’s “Project Structure” and in “Libraries”, add the folder that contains the Aspose libraries. The folder path MUST contain space, for example, “C:\Programs Files\Aspose 19.10\lib”
-
Run the program and you will get error:
Exception in thread “main” java.lang.ExceptionInInitializerError
at com.aspose.pdf.l32y.lf(Unknown Source)
at com.aspose.pdf.l32y.lI(Unknown Source)
at com.aspose.pdf.ADocument.lI(Unknown Source)
at com.aspose.pdf.ADocument.(Unknown Source)
at com.aspose.pdf.Document.(Unknown Source)
at TestAspose.main(TestAspose.java:46)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at com.aspose.pdf.internal.l9h.lv.(Unknown Source)
… 6 more
Caused by: java.lang.NullPointerException
at com.aspose.pdf.internal.l9h.lt.lI(Unknown Source)
… 7 more