License issue in aspose cells

Team we are getting license issue.

om.aspose.cells.CellsException caught: com.aspose.cells.CellsException: You are using an evaluation copy and have opened files exceeding limitation.

Purchase Date : 20200816
Subscription Expiry: 20210816

Jar version used with this license is

Implementation-Version: 20.8.0
Release-Date: 2020-08-12

Let me know if we need to update the jar version to solve this issue. When we purchased the license this was latest jar available on repo.

This is impacting our production env where users are not able to upload excel files. Please let me know correct way to solve this issue ASAP.

You are facing the 1st Limitation of evaluation license as explained in this document:

If you are facing this with a purchased license then send the license to me through a private message by clicking on my name icon (circled pink A) and then pressing the Message button.

Let me know if you receive my message privately.

Could you please send the file as ZIP instead of the contents of license file.

It looks like your licensing code is not processed. Please make sure the licensing code is processed first in your application. You may set some break points on the specified lines of code to make sure if these lines are processed or not. Moreover, you may dynamically check in code if the license is set or not, see the lines of code regarding Aspose.Cells:

Sample code:

Workbook workbook = new Workbook();

Let us know your feedback.

     File asposeLicenseFile = new File(this.m_webApplicationRootDirectory.getAbsolutePath() + "\\WEB-INF\\lib", "Aspose.Cells.lic");
     License license = new License();
     licenseFileStream = new FileInputStream(asposeLicenseFile);

This is the way we are setting. We purchased this license on 16th Aug 2020 and now we are facing this issue.

Last week 25th Oct we moved our code base on AWS ec2 docker instance. This is because of physical location change of our code. Please share your thoughts.

Any update on my previous comments. Team , please let me know the solution.

Workbook workbook = new Workbook();

I am getting true value in system out

Attached the recording of debug point.

We are not able to reproduce the issue by any means and need further assistance. Could you please share some simplified application which can be compiled and executed here to reproduce this issue as without reproducing the issue we are not able to assist you further. We are also getting true when Workbook.isLicensed() function is called and are able to create Excel files without any warning.

We faced this issue yesterday and received below error. This error you receive when you are using temp or expired license.

com.aspose.cells.CellsException caught: com.aspose.cells.CellsException: You are using an evaluation copy and have opened files exceeding limitation.

We restarted the server and this issue is solved. We are able to open excel file. I do not understand why we have received this and how it is solved after server restart.

I need to understand the meaning of these words “have opened files exceeding limitation.”

I am using licensed copy of aspose cells and I can open as many files I can. But based on this error it is restricting my limit to open the excel

I am afraid that I could not understand whether your issue is resolved or not after restarting the server as in your last sentence you have mentioned the following:

If your issue is completely resolved by restarting the server, then it seems to be related to following scenario.
License file not working anymore

Is there any way we can find that how many times I have opened the excel file? If you guys are throwing this exception that means you are calculating this open file count.

How do you we ensure that we have license file paid or evaluation copy ?

Team any update on my comment ?

Any file is opened or loaded by the API with Workbook constructor.

API internally counts how many times the constructor is called. Moreover, license validation is internal complex routine which validates or invalidates a license.

It may be related to some file cache or operating system access issue, that has now resolved after a restart. Because behavior of Aspose.Cells stays constant after restart. If you face this issue next time then let us know your feedback.

We have investigated a bit more. Could you please log FileInputStream.available() value in your code.For example,

License license = new License();
licenseFileStream = new FileInputStream(asposeLicenseFile);
int length = licenseFileStream.available();
//log the varible 'length' here.

Then run (Do not debug) it on your production environment, then check the log to see if the length is OK. If the logged length is not OK, try to use ‘servletContext.getResourceAsStream’ to get the stream.

See java - How to load a resource from WEB-INF directory of a web archive - Stack Overflow

Let us know your feedback.

Thanks for this. Will try and update you.

But the Logic I have sent written in 2010. After that we did not make any change just replacing the updated license file and their supported jars.

Just for your reference, this is also helpful:

It suggests to use ‘servletContext.getResourceAsStream’

The process you have sent to us is all are same. There are multiple ways to read the file from the web inf folder. The recording I have sent to you is showing that we can read the license file correctly.

Is it possible for you to share a simplified application as requested earlier? Also write down separately the list of issue which are resolved after restarting the server and list of issues which are not resolved yet for our clear understanding.