Free Support Forum -

Issue with License after deployment

The license file worked perfectly in our testing environment, but when deployed, we receive the following error.

Error Message: com/aspose/pdf/kit/License;

We are licensed for the following.

Aspose.Pdf.Kit for Java
Developer OEM
Limited to 1 developer.

Here is the code we use to load the license file. I made sure the file is present on the development and production server.

com.aspose.pdf.kit.License license = new com.aspose.pdf.kit.License();
FileInputStream myStream = new FileInputStream(“C:\OnlineCertificates\Aspose\Aspose.Pdf.Kit.lic”);

Should a one developer license work on a test computer and production server? I am one developer, but this is working on two computers. If we need more licenses, rather than purchase one right now, is there anyway to clear the license from the test computer and just use it on the production server?

Thanks, Adam

Weird, I take the license code out on the server and now I am getting an error with the PageSize.

Error Message: com/aspose/pdf/kit/PageSize

Code used to determine page size.

float pageWidth = PageSize.A4.height()-54;

We are using Oracle Application Server if that helps. Any ideas?

Thanks, Adam

It seems to have a problem finding the jar package file on the server. I included it in the project classpath and every lib folder I can find on the server. Any suggestions? Here is a more detailed error message.

package com.aspose.pdf.kit does not exist import com.aspose.pdf.kit.*;
[jsp src:line #:84]
package PageSize does not exist out.print( PageSize.A4.height());

It works fine in my development environment.

Thanks, Adam

Please close this ticket.

I finally found the classpath in the Oracle Application Server Enterprise Console. Once I included the path to the jar file in the class path, everything started operating correctly, even the licensing.

Thanks, Adam

Hi Adam,

Thanks for using our products.

I am glad to hear that your problem is fixed by properly adding Aspose.Pdf.Kit for Java to classpath. In case of any further query, please feel free to contact.