Aspose.note License Failure

Using com.aspose.note ver 16.12 I am getting the following error when trying to setLicense from my License

com.aspose.note.system.exceptions.InvalidOperationException: Failed to set license. Details:
at com.aspose.note.License.setLicenseInternal(Unknown Source) ~[aspose-note-16.11.0-jdk16.jar:16.11.0]
at com.aspose.note.License.setLicense(Unknown Source) ~[aspose-note-16.11.0-jdk16.jar:16.11.0]

I am reading the license into an input stream and calling com.aspose.note.setLicense(stream)
like I do for all other file types. This is the only file type in which I receive this error.

I tried giving it the direct path to the license instead of a FileStream and I am receiving the same error:
com.aspose.note.system.exceptions.InvalidOperationException: Failed to set license. Details:
at com.aspose.note.License.setLicense(Unknown Source) ~[aspose-note-16.12.0-jdk16.jar:16.12.0]

Our environment is as such:
Java - openjdk version “1.8.0_121”
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

Linux/CentOS - release 6.8 (Final)

I will be following the steps to send you my license file.


This Topic is created by kashif.iqbal using the Email to Topic plugin.

Hi,

We have investigated this issue at our end with CentOS release you have mentioned and are not able to reproduce the issue. We have tested this with our as well as your sample license but no exception was raised. Could you please try it on another PC and see if it resolves the issue?

Are you running in a Application Server? We are having the same issue, and I narrowed it down to Tomcat. It works in a standalone application in Windows and Fedora, but when run inside Tomcat, it fails on both platforms with the same exception you are seeing.

@JCORMIER_SCI,

We didn’t run any application server to test this at our end. It was plain Eclipse installed and we tested it in a simple Java application in it where the issue didn’t occur. We would follow your other thread for assisting you further in this regard.

I was actually just asking jthorhauer if their situation was similar to mine, as they didn’t specify if they were running in an Application Server, but it seems likely if they are running on CentOS. I was going to suggest that they watch my thread if that was the case.

@JCORMIER_SCI,

We tested the issue earlier with NetBeans and are now configuring Eclipse for testing your provided sample project. Unfortunately, we are having some issue configuring Eclipse environment at our end. However, it will be soon resolved and we’ll share our findings with you after testing the issue with Application Server.

@JCORMIER_SCI,

We have configured the Eclipse and Tomcat. We are able to:

  • Run the sample project provided by you.
  • Write the license file on the disk and set the license successfully.
  • Write and read the .one file successfully.
  • Create the copy of .one file using Aspose.Notes successfully.

The generated .one file has no watermark on it. The only issue that we encountered is while converting .one format to PDF and to image format. It says:

Failed to convert file: Value cannot be null.
Parameter name: trueTypeFont

We have tried to install many TTF but got the same exception.

We are running in a Web Server, sorry for the delayed response, I was still looking at the old forums. I read your thread and it looks like we have “almost” the same issue, Tomcat webserver seems to be the only place this issue exists for whatever reason

What version of Tomcat did you try for your test, I am on Tomcat 8.5.8 and JVM 1.8.0_131-b11

@John_Thorhauer,

We have apache-tomcat-8.5.16 version and following Java:

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

We have identical Java versions, I’d be curious as to @JCORMIER_SCI complete setup since he was also able to reproduce this error with not much problem

@John_Thorhauer,

Is it possible for you to establish your environment on a VM and share it with us for further investigation at our end? It is just because we are not able to reproduce the issue at our end and it could be reported to our Product team for a fix if we could reproduce it somehow.

Unfortunately that is not possible, however, I would like to try your setup. Can you send me the Tomcat version you are able to successfully run this on? As well as the jar(s) for the Aspose.note?

@John_Thorhauer,

Following are the required information.

Tomcat: apache-tomcat-8.5.16.tar.gz

Notes Jar: aspose-note-16.12.0-jdk16.jar

Java:

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Upgraded our Tomcat to the 8.5.16 version, am using the 16.12.0 version of aspose-note. Exact same error as before

AsposePreviewStream - An error occured while trying to create a preview for a file.
com.aspose.note.system.exceptions.InvalidOperationException: Failed to set license. Details:
at com.aspose.note.License.setLicenseInternal(Unknown Source) ~[aspose-note-16.12.0-jdk16.jar:16.12.0]
at com.aspose.note.License.setLicense(Unknown Source) ~[aspose-note-16.12.0-jdk16.jar:16.12.0]

@John_Thorhauer,

The issue has been logged into our system with ID NOTEJAVA-272 for further investigation by our Product team. We’ll update you here once there is any information or a fix version available in this regard.

We are running Tomcat 8.0.41. On my Windows dev box I have JDK 1.8.0_101-b13, and on Fedora 26 I have JDK 1.8.0_60-b27. Both environments fail to load the license file, either embedded or from a file.

I’m not sure your test was the correct one. What you are talking about sounds like how it works for me. If you just run it via the command line, there is no watermark. The instructions are in the ZIP file. You need to install the WAR and start Tomcat, which will create a “one_note” folder in your temp folder. Drop the sample .one file (or any .one file) in that folder, and the web app will convert it to .pdf and place it and the source file in one_note/output. That .pdf file will have the watermark.

@JCORMIER_SCI,

Thank you for the details. The information has been shared with the product team.

My suspicion is that your code is trying to fetch a resource from your jar file, but the method you are using doesn’t work in a web application. See java - How to load resource from jar file packaged in a war file? - Stack Overflow

@JCORMIER_SCI,

We’ll update you here once there is some further update available in this regard.