license.LicenseException: No valid license has been found

Ann james, modified 7 Years ago. New Member Posts: 14 Join Date: 10/2/18 Recent Posts

I have added chemaxon jars to my project.I have academic  license file provided by my institute .How should i provide this license file in my portlet.So that at time of execution it may get the license file.I tried passing it as lib but its not working.Also i tried adding the following code to my portlet:

chemaxon.license.LicenseManager.setLicenseFile(PATH).But it is still not working

Right now i m getting the following error:

chemaxon.license.LicenseException: No valid license has been found.
Product name: Structure to Name Plugin
Licenses are read from: C:\Users\chemaxon\license.cxl;C:\Users\chemaxon\license.cxl;C:\Users\chemaxon\license.cxl
Please visit http://www.chemaxon.com/contact-us/ or contact sales@chemaxon.com to obtain the corresponding license.


    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
    at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
    at chemaxon.license.XMLReader.checkLicense(XMLReader.java:164)
    ... 184 more
 

thumbnail
Minhchau Dang, modified 7 Years ago. Liferay Master Posts: 598 Join Date: 10/22/07 Recent Posts
Ann james:
Caused by: java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
    at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
    at chemaxon.license.XMLReader.checkLicense(XMLReader.java:164)
    ... 184 more

Supposedly, that's an error with the version of xerces that Liferay ships with (reference), and so the workaround recommended there is to add the indicated system property (if you're using Apache Tomcat, you can add it alongside all the other -D settings in setenv.sh and setenv.bat) so that it uses the JDK built-in schema validation.

Ann james, modified 7 Years ago. New Member Posts: 14 Join Date: 10/2/18 Recent Posts

It is still not working i have added the following into setenv files

  -Dchemaxon.license.url='path'

Please tell me if i am wrong

thumbnail
Minhchau Dang, modified 7 Years ago. Liferay Master Posts: 598 Join Date: 10/22/07 Recent Posts
Ann james:

Please tell me if i am wrong

I think there's something lost in translation. Did you already add the environment variable mentioned in the link I posted earlier?

-Djavax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory