Hi Muhammad,
The issue I previously reported has been resolved, but I have another problem using Aspose.Slides 16.11.0 in OSGi environment.
In my application, I work with dom4j library so I have to switch thread’s context class loader to org.dom4j.Document’s class loader to be able to use dom4j. Until Aspose.Slides for Java 16.11.0, I had no problem with loading presentations. With Aspose.Slides for Java 16.11.0, I’m not able to load presentation if I do the above context class loader switching.
Here’s a small test that gets executed in my OSGi (PaxExam) environment and fails to load the presentation.
public void asposeSlidesTest() {
ClassLoader old = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(Document.class.getClassLoader());
try {
InputStream inputStream = new FileInputStream(“Bonn_DMV_Classification.ppt”);
Presentation presentation = new Presentation(inputStream);
inputStream.close();
} catch (Exception e) {
e.printStackTrace();
} finally {
Thread.currentThread().setContextClassLoader(old);
}
}
This is the part of the stack trace with the exception:
java.lang.NullPointerException
at com.aspose.slides.ms.pbdb106a0.p7cce53cf.af.do(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.p883e881b.b.do(Unknown Source)
at com.aspose.slides.PatternFormat.do(Unknown Source)
at com.aspose.slides.PatternFormat.(Unknown Source)
at com.aspose.slides.zc.(Unknown Source)
at com.aspose.slides.zc.(Unknown Source)
at com.aspose.slides.FillFormat.setFillType(Unknown Source)
at com.aspose.slides.Presentation.final(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
What got changed in the latest Aspose.Slides release which prevents me loading presentations?
Can you check this?
Thanks,
Zeljko