@nbeck,
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.
@nbeck,
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:
e.g Sample code:
…
Workbook workbook = new Workbook();
System.out.println(workbook.isLicensed());
File asposeLicenseFile = new File(this.m_webApplicationRootDirectory.getAbsolutePath() + "\\WEB-INF\\lib", "Aspose.Cells.lic");
License license = new License();
licenseFileStream = new FileInputStream(asposeLicenseFile);
license.setLicense(licenseFileStream);
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.
@nbeck,
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
@nbeck,
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 ?
@nbeck,
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.
@nbeck,
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.
license.setLicense(licenseFileStream);
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.
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.