How to set license environment restriction?

User 514f4f188b

07-10-2009 12:30:35

Hi,


 


I'm facing a problem when trying to user jchem.jar on a customer instance. Their license has an integration restriction defined as:


<Restriction Name="Server Use" Value="Allowed"/><Restriction Name="Integrated With" Value="Kalabie ELN"/>

I cannot find how to indicate to LicenseManager the "Integrated With" value so the license is not recognize, so nothing works...


I made a try with LicenseHandler (which is not in your javadoc, does it mean that we shouldn't use it?). Here is my code:


LicenseHandler.getInstance().setLicenseFile(licensePath);
LicenseHandler.getInstance().setLicenseEnvironment("Kalabie ELN");
if (LicenseHandler.getInstance().isLicensed(LicenseManager.JCHEM)) ...

In this case, the "isLicensed" method returns true, but when I'm runing a search, a LicenseException is raised.


E.g:


JChemSearch searcher = new JChemSearch();[...]searcher.run();

Message:


No valid license has been found.
Product name: Structure search
License path: C:\Documents and Settings\LocalService\chemaxon\license.cxl
Please contact sales _at_ chemaxon.com to obtain the corresponding license.
Students and academic researchers are entitled of free use
through our Academic Package, for more information
please visit: http://www.chemaxon.com/acpack_conditions.html />

I guess the problem is that the LicenseManager is not aware of the "Integrated With" restriction but I can't find how to set it.


I hope you can help.


Thanks,


Alban.

User 514f4f188b

07-10-2009 13:19:14

I found how to set the license environment on the searcher:



JChemSearch searcher = new JChemSearch();


[...]


searcher.setLicenseEnvironment("Kalabie ELN");


searcher.run();


 


When I'm checking license (by using searcher.isLicensed()) it is ok but when invoking the run method, the license exception is still raised...


 


What could be wrong?

ChemAxon 909aee4527

07-10-2009 13:47:20

Dear Alban,


unfortunately my colleagues have sent you a wrong license, this field is not supported for integration, though originally it was planned for this. It will be completely removed in the near future.


My colleague, Nora has just sent you a corrected license file.


We are sorry for the inconvenience this may caused.


Should you have any more questions, please don't hesitate to ask.


Kind regards,
Judit

User 514f4f188b

07-10-2009 14:00:08

Hi Judit,


 


Thanks for your answer. Unfortunately, I realized that my email adress was not up to date. Is it possible to send it again with the one I updated now?


 


Thanks.