License question: host machine vs server question

User 0927b82fae

28-11-2012 15:47:11

Hello!


I was having some difficulty with a license I recently acquired (a little more than a month ago).


When I installed the license on my home machine, everything seemed to work: when MarvinView opened up, I could view the license file in the 'Help' menu.


When I migrated this to the server, the license file is no longer 'seen' (it does not appear when I look under "Help->Licenses..."


 


I was just curious as to what I can do to fix this issue?


The version of MarvinView that is being used is version 5.5.1.0.


 


Thanks!

ChemAxon b124dd5f17

30-11-2012 09:24:37

HI, 


Can you tell more about what you were doing and what license you hav, as well as the environment you are working with. Notice academic package licenses do not support server use.


Alex

User 0927b82fae

30-11-2012 14:46:12

Hi Alex,


The program I developed is a Java interface to access a database containing the masses of many different lipid species.  When the user chooses one of the lipids, the chemical structure is drawn and displayed to the screen.  I am using an algorithm to draw the structures, and MarvinView display these drawings to the screen.  The program is to be published on a freely-accessible web-page, packaged as an applet (so that the program is accessible to the scientific community to use, however we are not making it distributable, nor are we releasing the source code).


 


When I previously discussed my program, and what license I am eligible for, I was given a FreeWeb license.


 


Thanks!

ChemAxon b124dd5f17

03-12-2012 09:12:57

HI


The functionality should be covered with the license - so I ask a colleague to respond regarding the technical issues. You did install the license file in the new server I assume?


Please also could you give your environmental variables, OS etc etc, this will help those supporting you


Cheers/Alex

User 0927b82fae

03-12-2012 20:05:53

Hi again,


As it stands now, I believe I installed it on the server: I only have FTP access (the webserver itself is off-site), so I put the license file I received in the folder "../chemaxon/license.cxl".  Within the program itself, using the API (as per the Installing Licenses on Servers page), I directed the program to the license using the specific URL of the file on the server itself (i.e., "http://xxx.xxx.xxx.xx:yyyy/chemaxon/license.cxl").


When I tried this the first few times, I got errors saying the program could not read the file, so I converted the license file to an xml file, read that into a String, then set the license file to the String that was read in.


 


As per the server environmental variables, I do not currently have information on them, but might be able to get them if they are necessary.


 


Thanks!

ChemAxon e274e1bada

05-12-2012 13:53:22

Hi,


Did you use LicenseManager.setLicenseFile("license_path") method for set the license path? That should be working.


Regards,
Edvard

User 0927b82fae

20-12-2012 21:34:18

Hi,


Sorry for the late reply, a lot of things came up all at once.


Currently I don't have the LicenseManager.setLicenceFile("license_path"); method.  I tried that, and it wouldn't read in the license file.  So what I did instead was read in the license file into a string, and then I used the LicenseManager.setLicense(s); method.


However, when I tried this (reading the license file in from the URL on the web-server), it also failed.   When I converted the license file's filename to a .xml (just changed the extension to xml), it was able to read in the file fine, but the LicenseManager.setLicense(s); did not seem to work (as one might expect).


 


I have this code in the initialize(); method (one that is called by the constructor of the GUI for the applet), which initates the GUI.  Should I have put the above code (or the LicenseManager.setLicenseFile("file_path") method) in the same method where I call the Marvin software?


 


Thanks!

ChemAxon e274e1bada

03-01-2013 15:28:26

Hi Raziel,


Sorry, I've just come back from the holiday.


I cannot find your code in the post. could you attache that?


Thanks,
Edvard

User 0927b82fae

18-01-2013 21:26:27

Hello Edvard,


Sorry for the late reply, I was away from the lab for a while.


 


If you need any extra code, please let me know!


 


Within the initialize() method, I have this code:



URL baseUrl, docURL = null;

        try {
            baseUrl = new URL("http", "<web address>", <port>,  "/chemaxon/");
            String urlLink = "license.xml";

            docURL = new URL(baseUrl, urlLink);
        } catch (MalformedURLException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

        try {

            BufferedReader in = new BufferedReader(
                    new InputStreamReader(docURL.openStream()));
            String s = "";
            String inputLine;
            while ((inputLine = in.readLine()) != null) {
                s += inputLine + "\n";
            }
            in.close();
            System.out.println(s);


            LicenseManager.setLicense(s);
        } catch (LicenseProcessingException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }



 


That's the part of the initialize method where I read in the license file.  I converted the license file to an .xml file, because when I left it as the .cxl file (as was provided), I got a lot of errors.  This way, I was able to read in the file, and print out the individual lines of it (hence the "System.out.println(s);").


The code where I initialize the Marvin code is further down.  Do you need to see that as well?  (It is very similar to code posted on this website (http://www.chemaxon.com/marvin/examples/beans/view-table/ViewTable.java.html).


 


Thanks for your time!


Sincerely,


Raziel