Free Support Forum - aspose.com

Compatability support for Open JDK 11 and Open JDK 13 in Aspose.Slides (Java)

Now we wanted to switch our project from oracle jdk 8 to openjdk 13, but unfortunately when creating a (new Presentation(String file)) object we get java.lang.NoClassDefFoundError. We did the same check for openjdk 11 and oracle jdk11. The error remained the same. Could you please explain which version of java we can use?

@Alexander9132,

I have observed the issue shared by you and request you to please share the Aspose.Slides for Java version used on your end along with complete stack trace. If you are using any older version then please first try using latest Aspose.Slides for Java 19.12 on your end and share if that works or not on your end. Ideally, JDK 10 and 11 should work with latest version.

Here is my configuration:
java version “11.0.5” 2019-10-15 LTS
Java™ SE Runtime Environment 18.9 (build 11.0.5+10-LTS)
Java HotSpot™ 64-Bit Server VM 18.9 (build 11.0.5+10-LTS, mixed mode)

dependency:
com.aspose-slides 19.12 jdk16

Stack trace:
java.lang.NoClassDefFoundError: Could not initialize class com.aspose.slides.Presentation

@Alexander9132,

Thank you for the information. As requested earlier, please provide the complete stack trace with us that will be helpful to us in investigating the issue.

Sptring source_file.getAbsolutePath() = “/tmp/ClearSlide/working/8JRA4KX6V3W43QAACDMX/80971a37-ebc5-4351-bab4-98d78339f7be-Presentation1.pptx”
(An exception appears in this place - Powerpoint.java:82) —> Presentation presentationToPdf = new Presentation(source_file.getAbsolutePath());

java.lang.NoClassDefFoundError: Could not initialize class com.aspose.slides.Presentation
at com.cs.tools.Powerpoint.convertPPT(Powerpoint.java:82)
at com.cs.PPTConvertServlet.doConvertPowerpoint(PPTConvertServlet.java:46)
at com.cs.CSConvertRootServlet$ConverterWrapper.convertPPT(CSConvertRootServlet.java:184)
at com.cs.CSConvertRootServlet.doGet(CSConvertRootServlet.java:111)
at com.cs.CSConvertRootServlet.doPost(CSConvertRootServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)

@Alexander9132,

Thank you for sharing the information. An issue with ID SLIDESJAVA-38017 has been created in our issue tracking system as investigation to further investigate it. This thread has been linked with the isse so that you may be notified once the issue will be fixed.