Is PresentationEx thread safe?

Hello,


I am using the latest Aspose.Slides for Java (2.2.0). I have code that processes files in a multiple threads. This works great for .ppt (Presentation) files but fails for .pptx (PresentationEx) files. If I run the same code without multiple threads, .pptx (PresentationEx) files work fine. The failure appears to be that one cannot create/initialize the PresentationEx when multithreaded. The traceback looks like this:

java.lang.ExceptionInInitializerError
Java stacktrace:
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.aspose.slides.pptx.PresentationEx.(SourceFile:1740)
at
Caused by: java.lang.NullPointerException
at com.aspose.slides.obfuscated.aio.do(SourceFile:18)
at com.aspose.slides.obfuscated.kt.(SourceFile:113)
… 4 more

I’m calling PresentationEx like this:

pptx = PresentationEx(new FileInputStream(new File( pptxPath)));

I call the Presentation constructor the same way and it works for .ppt files in the multithreaded context. I have also tried the version of the PresentationEx constructor that takes the pptxPath as a String, with the same result.

Thank you for any hints you can give for making PresentationEx work in a multithreaded context.

MZ

Hi Erik,

Thanks for your interest in Aspose.Slides.

I have tried to reproduce the issue by calling a PPTX file in a multithreaded environment, but have not been able to get the exception specified by you. I have executed the attached code snippet using Aspose.Slides for Java 2.2.0. Please share some more details, if the problem still persists.

Thanks and Regards,