Free Support Forum - aspose.com

License problem in Z/OS environment

Hello

We are running a java program in a z/OS machine and, when trying to set the license, we are getting this exception:

com.aspose.cells.AsposeLicenseException: The license is invalid.
at com.aspose.cells.License.a(Unknown Source)
at com.aspose.cells.License.setLicense(Unknown Source)
at AsposeCellsTest.main(AsposeCellsTest.java:35)
Caused by: com.aspose.cells.AsposeLicenseException: Error creating license public key.
at com.aspose.cells.License.a(Unknown Source)
… 3 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -16
at com.aspose.cells.r.a(Unknown Source)
at com.aspose.cells.r.a(Unknown Source)
at com.aspose.cells.r.a(Unknown Source)
at com.aspose.cells.r.a(Unknown Source)
… 4 more

I think that the problem is related to the fact that the default encoding in that platform is EBCDIC (Cp1047) and thus it has some problems reading the license file which is utf-8 encoded.

In fact, if we set the default encoding to utf-8 when launching the JVM with -Dfile.encoding=utf-8, the license is accepted and the excel file is generated correctly. However, this is not a solution for us as the output messages from the application become unreadable in that platform as they are also encoded in utf-8…

Hi,

We will look into your issue and get back to you soon.

Thank you.

Hi,

Please try this fix. Thank you.

I should have told you that I’m using JDK 1.4.2.

I think that the fix is compiled with JDK 5 and I’m getting:

java.lang.UnsupportedClassVersionError: com/aspose/cells/AsposeLicenseException (Unsupported major.minor version 49.0)

Can you send me the fix for JDK 1.4?

Hi,

Yes, the previous one is for JDK5. Please try this attached fix for JDK14.


It works. Thanks for the quick response !