Would you please ensure using Aspose.PDF for Java 19.6 and then mention how much time does setting the license takes in Linux environment. You may please calculate it with Java code that how many seconds are elapsed by setLicense method.
Does the PDF jar have the one method, similar to the isLicenseSet() in the cell?
I use it in web-project,Is it true that after tomcat is started and lic is verified, the following code does not need to verifie lic when using PDF function?
The license should be set once per application context only, so you may set it when the application starts execution. Validating a license is not necessary but setting it is, because validation is a double check if license setting has been successful or not.
This does not appear to be operating system related issue but probably your application specific problem. Would you please share a sample application containing SSCCE code so that we may proceed to investigate your scenario in our environment.
There were some changes in Aspose PDF 19.6 which is causing SecureRandom to use /dev/random for entropy but that’s not a great device to use for a headless environment. You can force the JVM to use /dev/urandom with a JVM argument:
-Djava.security.egd=file:/dev/./urandom
I’m not sure if they plan on changing this but it’s a viable workaround for now. See this page for more info on java and SecureRandom performance.
We have further investigated this ticket and would like to update you that, according to JVM securerandom algorithm, on some operating systems /dev/random waits for a certain amount of “noise” to be generated on the host machine before returning a result.
The library used for random number generation in Oracle’s JVM relies on /dev/random by default for UNIX platforms. Although /dev/random is more secure, it is recommended to use /dev/urandom if the default JVM configuration have delays. Or add devices that generate entropy for /dev/random by following steps:
Open the $JAVA_HOME/jre/lib/security/java.security file in a text editor.
Change the line “securerandom.source=file:/dev/random” to read: securerandom.source=file:/dev/./urandom
Save your change and exit the text editor.
You can also set up system property “java.security.egd” which will override the securerandom.source setting.
-Djava.security.egd=file:/dev/./urandom
We will also be adding this information in a readme.txt file, inside zip archive with next release.