Free Support Forum - aspose.com

java.lang.NoClassDefFoundError: Could not initialize class com.aspose.cells.b.a.b.zh

Hi,

When running this code to attempt to convert an excel to PDF:

Workbook workbook = new Workbook(excelStream);
    final File tempFile = TempFileUtil.createTempFile();
    try (FileOutputStream fos = new FileOutputStream(tempFile)) {
        workbook.save(fos, com.aspose.cells.SaveFormat.PDF);
    }
    return tempFile;

I receive the above NoClassDefFoundError.

I am using aspose-cells 19.12, i’ve tried updating the version and the error persists. I am using openjdk version 1.8.0_282 running on Centos 7 - the issue does not occur when running the same version of java on windows 10

@connormona,

This is really strange as you find this issue. Could you please provide complete error trace and description. Moreover, kindly provide more details about your environment. Do you run your code as a standalone program/app or you are using some container, please elaborate?

@connormona,
You have mentioned that you tested this issue with version aspose-cells 19.12. Could you please try this scenario with the latest version 21.3 also and share the feedback.

Thanks for the responses - I believe I have found the issue and it relates to https://github.com/AdoptOpenJDK/openjdk-build/issues/693 and is not an issue with aspose

Cheers

@connormona,
Thank you for the feedback. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.