Aspose Version Compatible with Open JDK 17

Hi Team,

We are migrating our JDK 8 and Aspose 16.11.0 version to JDK 17 and Aspose 23.12 version.

We are getting the following error. Can you please confirm if we are using right version of Aspose that is compatible with JDK 17.

On local this is working fine but when we deploy this to server its throwing the following exception.

2024-06-27 10:25:42.728 ERROR 1 — [p-nio-80-exec-7] c.n.j.e.RestEntityExceptionHandler : {“transactionId”:“MISSING”,“hostName”:“b62e190a0d7e”,“logLevel”:“ERROR”,“logType”:“APP”,“message”:“USER_ID = "35", CLIENT_ID = "null", CONTEXT = "null", GSID = "null", ERROR_ORIGIN = "SERVICE", ERROR_TYPE = "null", ERROR_MESSAGE = "Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.aspose.slides.internal.s1.iy", ERROR_KEY = "UNAHNDLED_EXCEPTION", ENVIRONMENT = "UNKNOWN", ERROR_DESCRIPTION = "Could not initialize class com.aspose.slides.internal.s1.iy", ERROR_CODE = "UNKNOWN"”,“threadId”:70,“dateTime”:“2024-06-27T10:25:42.728+0000”,“sourceApplication”:{“appDisplayName”:“MISSING”},“class”:“com.nielsen.jbp.exception.RestEntityExceptionHandler”}

@rajeshtata,
Thank you for contacting support.

Please check carefully whether the Aspose.Slides dependency is configured correctly in your project. For exampe, if you use Maven, it should be like this:

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://releases.aspose.com/java/repo/</url>
</repository>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>23.12</version>
    <classifier>jdk16</classifier>
</dependency>

If the issue persists, please share a sample project to reproduce the error on our end, then we will investigate the case and help you.

@andrey.potapov When we debugged further post your recommendation the code is failing in this block.

final ByteArrayOutputStream pptStream = new ByteArrayOutputStream();

if (presentation != null) {

    presentation.save(pptStream, SaveFormat.Pptx);

} else {

    logger.info("presentation object is NULL. Please check.");

}

Export export = new Export();

export.setExportContentType(ExportPlatformConstants.PPT_CONTENT_TYPE);

export.setExportFileName(getPPTFileName());

export.setExportOutput(pptStream);

return export;

@rajeshtata,
Could you please share a sample project to reproduce the error on our end?

@rajeshtata,
Our developers have investigated the case with the error you described. The error occurs when trying to create a FontFamily. It looks like you not only upgraded the Aspose.Slides and JDK versions, but also updated your server. If the issue persists, please indicate the OS version and the fonts are installed. You should also check the permissions for the process to access the fonts if it is Linux.