com.aspose.imaging.coreexceptions.FrameworkException: Failed to set license. Details: Signature encoding error

Team,

Am getting the below error while trying to load the temporary license, using a .lic file (that was send by Aspose via email) kept in a specified path. I am using the java code for the same. Below are further details. Need your help to resolve this.

The error :
“com.aspose.imaging.coreexceptions.FrameworkException: Failed to set license. Details: Signature encoding error”.

JAR Version used : aspose-imaging-20.12-jdk16.jar (as it support JPEG 6 compression)

Code used is :
com.aspose.imaging.License license = new com.aspose.imaging.License();
license.setLicense(“File Path”);

@balu.se

The error message “com.aspose.imaging.coreexceptions.FrameworkException: Failed to set license. Details: Signature encoding error” typically indicates an issue with the license file you are trying to use. Here are some steps you can take to resolve this issue:

  1. Check License File Integrity: Ensure that the license file you received is not corrupted. The file should be in XML format and should not have been modified in any way. Even a small change, such as an extra line break, can invalidate the license.

  2. Correct File Path: Make sure that the file path you are providing in your code is correct. If possible, place the license file in the same directory as the Aspose Imaging JAR file and use just the file name in your code. For example:

    license.setLicense("Aspose.Imaging.lic");
    
  3. Use the Correct License Name: Ensure that the name of the license file matches what you are using in the setLicense method. If you renamed the file, make sure to update the code accordingly.

  4. Check for Multiple Aspose Products: If you are using multiple Aspose products, ensure that you are applying the correct license for each product.

  5. Consult Documentation: Review the licensing documentation for Aspose.Imaging to ensure you are following the correct procedures for applying the license.

If you continue to experience issues after checking these points, consider reaching out to Aspose support for further assistance.

Sources:
[1]: Licensing - Aspose Documentation

Tried all the mentioned steps. Still getting the same error. Also, the file that i received had a naming “Aspose.ImagingforJava.lic”. Is this okay? I tried, by placing the file in different path, renaming the file and updating the same in code references. Still no luck.

Found a point. When i use “aspose-imaging-24.9-jdk16.jar” the license file is loading. But, i need to use “aspose-imaging-20.12-jdk16.jar” in order to support JPEG 6 Compression, where the license is failing to load. I need a solution to load version “aspose-imaging-20.12-jdk16.jar”. Please help me with this.

@balu.se , we are reviewing your request. You will be answered shortly!

1 Like

Hello @balu.se
Unfortunately old versions of Aspose.Imaging (less then 21.4) does not support new license files (which use SHA256withRSA algorithm). You can use only old license files for old versions of the library.

Kindly let me know, of how to get the old license file.

@balu.se
I will get to know this and inform you soon. But may I ask why you need the old version of Aspose.Imaging?

In fact the fastest way is to write directly to our Paid Support.
You may tell them that you need a license in the old format with 128 signatures.