We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

NoClassDefFoundError when instanciating com.aspose.slides.Presentation

When instanciating com.aspose.slides.Presentation I’m getting a java.lang.NoClassDefFoundError. Any ideas why this happens? Please see stack trace below.



I’m using aspose-slides 15.8.0.
Host Operating System is AIX, version 7.1
Java version = 1.7.0, Java Compiler = j9jit27, Java VM name = IBM J9 VM


Java-Code to reproduce:
File f = new File(“any.file”);
InputStream is = new FileInputStream(f);
Presentation p = new Presentation(is);


Stack trace (shortened):
java.lang.NoClassDefFoundError: com.aspose.slides.ms.pbdb106a0.p6a2feef8.p (initialization failure)
at java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:84) ~[?:1.7.0]
at com.aspose.slides.p6a2feef8.p9f36407e.k.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.p6a2feef8.p9f36407e.k.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.p6a2feef8.p9f36407e.h.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.vr.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.vi.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.vi.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bmr.int(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bmr.static(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.blu.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.blu.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.blu.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.blu.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.TextFrame.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.TextFrame.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.TextFrame.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.AutoShape.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.GroupShape.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Slide.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Slide.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.aux.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.aux.if(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.save(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at org.mysourcode.MyClass.doSomething()
… 62 more
Caused by: java.lang.NullPointerException
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.p.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.o.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.o.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.p.for(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.p.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.p6a2feef8.p9f36407e.k.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.p6a2feef8.p9f36407e.k.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.p6a2feef8.p9f36407e.h.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.vr.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.vi.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.vi.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bmr.int(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bmr.static(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bla.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bla.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bla.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bla.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.TextFrame.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Table.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Table.try(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bir.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.yh.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.yh.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.cz.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.bdj.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.awc.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.auw.byte(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.auw.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.int(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.if(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at org.mysourcode.MyClass.doSomething()
… 16 more

Hi Federico,

I have observed the stack trace shared by you and request you to please provide the source presentation so that I may investigate the issue further on my end. Can you please also share that if you have ever tried older version than Aspose.Slides for Java 15.8.0 that was working on your end.

Many Thanks,

The problem is not dependent on the file you provide. The Exception occurs when instanciating the class “com.aspose.slides.Presentation”. The NullPointer occurs in the static initialization block of that class. That’s even before entering the constructor. Therefore use any file you like to reproduce.


The latest version that was working for us was 15.4.0. Haven’t tried any newer though.

Hi Federico,


I have observed your comments and worked with the code shared by you but I am unable to reproduce the issue. The only way I have managed to observe same issue is when I removed Aspose.Slides Jar files from the project and then the error NoClassDefFoundError occured . I request you to please double check that you have added the jar files of Aspose.Slides for Java 15.8.0 on your end.

If you have added the jar files but the issue still persists then please try using Aspose.Slides for Java 15.7.0 on your end and then share with us a sample project, along with jar files added to the project, which is causing the error on your side so that we may investigate it further to help you out.

Best Regards,

Please double check the stack trace I’ve inserted in the post above to verify that the NullPointerException occurres deep within aspose.slides code. In my opinion this is a hint that there’s probably nothing wrong with loading the JAR.


Maybe you’re interested to hear that in my local environment, this problem does not occur. So it might be an environment dependent issue. That’s why I’m anxious to finding out what is causing a NullPointerException at:
com.aspose.slides.ms.pbdb106a0.p6a2feef8.p.do(Unknown Source)

Unfortunately, I’m not able to find out by myself since the code is obfuscated and I can’t debug it myself. So if you could please check in your un-obfuscated code why a NullPointerException occurs in the method I’ve mentioned above… Is it checking fonts? Any environment stuff? Anything else?

Hi Federico,


I have observed your comments and like to share with you that we really wish to help you and request you to share with us a sample presentation which reproduces the issue. That presentation will serve as a benchmark for resolution of the issue. Please share with us a sample presentation so that we may proceed further to help you out. Also, I request you to please try using Aspose.Slides for Java 15.7.0 on your end before you share the presentation file with us.

Best Regards,

Please take any file you like. However, for your convenience I’ve attached a file to this post.


I’m still guessing it’s an environment specific problem. So it might help to look into the un-obfuscated java code at
com.aspose.slides.ms.pbdb106a0.p6a2feef8.p.do(Unknown Source)

Hi Federico,


Thank you for sharing the file.

I have observed your comments and like to share with you that, a ticket with ID SLIDESJAVA-35063 has been logged into our issue management system for further investigation and resolution of the issue. This thread has been linked with the issue so that you may be automatically notified as soon as the issue will be fixed.

We are sorry for your inconvenience,

I am pretty sure this issue is environment specific. I am seeing this issue as well.
This is not reproduced on my Win8.1 PC and reproduced on amazon linux box.
My best guess that this is somehow connected with fonts.
Guys, please create some kind of hotfix for this

Hi Federico,


I would like to share with you that we have found some contradiction between the code shared by you and the stack trace. Your code does not contain the method Presentation.save() but the stack trace says the exception is being thrown on Presentation.save() call. You may have missed some code while reporting the issue. Please verify if you have shared the correct sample code or some of it is missing. Share this information with us so that we may investigate it further to help you out.

Andrey, Thank you for your interest in Aspose.Slides.
I have observed your comments and like to request you to please make a separate post and there you may refer to the thread which looks like an issue identical to your issue so please share with us the details of the issue that you are facing along with the source file which you are using on your end so that we may investigate it on our end.

Best Regards,

I reproduced the NullPointerException with the attached file I’ve posted earlier. Here is what java says:


Caused by: java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.ensureError(J9VMInternals.java:134) ~[?:1.7.0]
at java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:123) ~[?:1.7.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.pa5e0ff62.a.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.qn.int(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.qo.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.awc.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.auw.byte(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.auw.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.int(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.if(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at org.mysourcode.MyClass.doSomething()
… 62 more
Caused by: java.lang.NullPointerException
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.p.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.o.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.o.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.p.for(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.p.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.pa5e0ff62.a.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.qn.int(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.qo.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.awc.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.auw.byte(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.auw.do(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.int(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.if(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at com.aspose.slides.Presentation.(Unknown Source) ~[aspose-slides-15.8.0.jar:15.8.0]
at org.mysourcode.MyClass.doSomething()
… 62 more

Does this help you to investigate further?

Hi Federico,


Thank you for sharing the stack trace.

I have observed your comments and like to share with you that this stack trace is what we were expecting from your side. The issue reported by you has been fixed and we will share the notification with you as soon as the hotfix Aspose.Slides for Java 15.8.1 will be shared online.

Best Regards,

Meanwhile, this might help anyone as a workaround to use 15.8.0 on a UNIX system:

Setting the custom fonts dir prevents NullPointer when initializing Presentation-class:

com.aspose.slides.FontsLoader.loadExternalFonts(new String[] { “/my/fonts/dir” });

Hi Federico,


Thank you for sharing your findings.

I have observed your comments and like to share with you that, it could be helpful for other people who have reported the same issue. We will notify you as soon as the hotfix Aspose.Slides for Java 15.8.1 will be shared online.

Best Regards,

The issues you have found earlier (filed as SLIDESJAVA-35063) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.