Distributing databases etc via webstart

User 169b52bbd8

27-03-2008 02:23:23

Dear IJC experts





I had a quick look at the webstart version of IJC. It looks to be ideal for distributing data within a department or project. Is it possible (yet) to distribute the database schema with the application? If so, how?





Cheers





David

ChemAxon fa971619eb

27-03-2008 09:14:01

David,





In IJC 2.3 we are adding the ability for an administrator to centralize the definition of a project, including all its database connections etc,


The administrator puts the project configuration on a web server and all users can use that project definition. With the Java Web Start version it is possible to include that project definition as part of the JWS configuration so that it is loaded automatically.when IJC starts. This way users just click on the Launch IJC button in the web pages and when it opens the project is already there and the users don't need to deal with defining the database connections etc. Also, all shared forms, queries, lists etc. will also be available to all users,





The one obvious restriction is that only remote databases should be part of the shared project, for reasons that should hopefully be obvious!





Is this what you were wanting?





Tim

User 169b52bbd8

27-03-2008 22:57:03

Hi Tim,





That is exactly what I am after. I have tried distributing projects, but the current process of connecting to remote databases is quite complex. Is there a proposed release date for version 2.3?





Thanks





David

ChemAxon fa971619eb

28-03-2008 10:08:56

David,





I can't give an exact date, but it should definitely be during April.


The coding is mostly complete now, but we still have lots of loose ends to tie up, lots of testing and lots of documentation to write!





There is a preview available to look at.


http://www.chemaxon.com/instantjchem/ijc_latest/jws_development.html


This should be updated today, so I'll hold off looking at it until then.


But please note that this preview is not suitable for rolling out to end users. I would wait for the release for that.





I also attach draft documentation for setting up shared projects.





Tim

User 169b52bbd8

31-03-2008 02:00:10

Hi Tim,





Thanks for that. Would it be possible to get the development version, including associated files as a zip package so that I can test it on my local web server?





Cheers





David

ChemAxon fa971619eb

31-03-2008 07:21:24

As always, the zip file is present in the directory.


http://www.chemaxon.com/instantjchem-jws/dev/ijcinst-jws.zip





Tim

User 169b52bbd8

01-04-2008 02:48:34

Hi Tim,





I have installed v 2.3 dev and followed your instructions to distribute a project via the web server.





I am not sure that I have the projects.ijp file right - the example file 'http://www.chemaxon.com/forum/projects.ijp' is missing from your web server.





Here is my version:





<?xml version="1.0" encoding="UTF-8"?>





<!--


prj_configuration attributes:


codebasename - url where is the configuration file deployed (useful if you deploy already downloaded file)


version - change it on configuration update, you don't need to use it


-->





<prj_configuration codebasename="http://hydra.vcp.monash.edu.au/ijc/" version="1">


<!--


prj attributes:


url - relative url with zip file, the zipfile contains packed project with .server configurations


name - name of project


version - change it together with version configuration if project is updated


-->


<prj url="compactus9.zip" name="compactus9" version="1"/>


</prj_configuration>


~





Here is the master file:





<?xml version="1.0" encoding="UTF-8"?>


<jnlp spec="1.0+" codebase="http://hydra.vcp.monash.edu.au/ijc/" href="master.jnlp">


<information>


<title>Instant JChem (JWS DEV)</title>


<vendor>Chemaxon Ktf.</vendor>


<description>Instant JChem Java Web Start DEV version</description>


<description kind="short">Instant JChem 2.3 Development Version</description>


<homepage href="http://www.chemaxon.com/product/ijc.html"/>


<shortcut online="false">


<desktop/>


<menu submenu="ChemAxon"/>


</shortcut>


<icon href="frame32.gif" kind="default"/>


<offline-allowed/>


</information>


<security>


<all-permissions/>


</security>


<resources>


<j2se version="1.5+"/>


<jar href="JNLPInstaller.jar" main="true" download="eager"/>


</resources>


<application-desc main-class="com.im.ijc.jnlpinstaller.Main">


<argument>--openUrl</argument>


<argument>http://hydra.vcp.monash.edu.au/ijc/projects.ijp </argument>





<!-- license configuration


<argument>-J-Dijc.license.url=http://yourserver/license.cxl</argument>


Do not show Welcome screen on startup


<argument>-J-Dijc.not.welcome=true</argument>


-->





</application-desc>


</jnlp>








Here are the contents of compactus9.zip





unzip compactus9.zip


Archive: compactus9.zip


creating: compactus9/


creating: compactus9/.private/


creating: compactus9/.private/com.im.ijc.core.api.views.AbstractViewTopComponent/


inflating: compactus9/.private/com.im.ijc.core.api.views.AbstractViewTopComponent/0.ser


inflating: compactus9/.private/com.im.ijc.core.api.views.AbstractViewTopComponent/1.ser


inflating: compactus9/.private/com.im.ijc.core.api.views.AbstractViewTopComponent/2.ser


inflating: compactus9/.private/private.properties


creating: compactus9/.server/


creating: compactus9/.server/compactus9/


inflating: compactus9/.server/compactus9.ijs


creating: compactus9/.wbproject/


inflating: compactus9/.wbproject/project.properties


inflating: compactus9/README.txt





When I start up IJC there is no new project in the project window.





The following errors appear in the logfile.





Cheers





David





WARNING [org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogFactory]: Property PROP_IDE_IDENTITY hasn't been initialized yet.


INFO [org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalog]: No content in cache for Chemaxon_IJC_Standard_UpdateCenter provider. Returns EMPTY_MAP


INFO [com.im.workbench.project.url.URLContentImpl]: PROJECT property is not available in http://hydra.vcp.monash.edu.au/ijc/projects.ijp


INFO [com.im.workbench.project.configuration.Configuration]: no server folder in compactus9,[email protected][Users/david/Library/Application Support/instantjchem/ws_2.3/SharedConfigurations/2/conf_tmp_folder/compactus9]


INFO [com.im.workbench.project.configuration.Configuration]: no server folder in compactus9,[email protected][Users/david/Library/Application Support/instantjchem/ws_2.3/SharedConfigurations/2/conf_tmp_folder/compactus9]


INFO [com.im.workbench.project.configuration.Configuration]: Open projects - null,0,1


INFO [com.im.workbench.project.url.URLContentImpl]: PROJECT property is not available in http://hydra.vcp.monash.edu.au/ijc/projects.ijp


INFO [com.im.workbench.project.url.URLContentImpl]: Project was not deployed for url http://hydra.vcp.monash.edu.au/ijc/projects.ijp


INFO [com.im.workbench.project.url.URLContentImpl]: Executed URL:http://hydra.vcp.monash.edu.au/ijc/projects.ijp


INFO [com.im.workbench.project.configuration.Configuration]: no server folder in compactus9,[email protected][Users/david/Library/Application Support/instantjchem/ws_2.3/SharedConfigurations/1/conf_tmp_folder/compactus9]


INFO [com.im.workbench.project.configuration.Configuration]: Open projects - null,0,1


Diagnostic information


Input arguments:


-Djdk.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home


-Dnetbeans.system_http_proxy=DIRECT


-Dnetbeans.system_http_non_proxy_hosts=


-Dnetbeans.dirs=/Users/david/Library/Application


Support/instantjchem/ws_installation_2.3/bin/../instantjchem:/Users/david/Library/Application


Support/instantjchem/ws_installation_2.3/bin/../ide8:


-Dnetbeans.home=/Users/david/Library/Application


Support/instantjchem/ws_installation_2.3/platform7


-Dcom.apple.mrj.application.apple.menu.about.name=instantjchem


-Xms48m


-Xmx128m


-Dderby.system.home=derby


-Dnetbeans.logger.console=true


-ea


-Dorg.netbeans.ProxyClassLoader.level=1000


-DuseGtk=false


-Dderby.system.home=/Users/david/Library/Application


Support/instantjchem/ws_2.3/var/derby

ChemAxon fa971619eb

01-04-2008 08:29:41

Hi David,





Thanks for trying this out.





I can see 2 problems with your configuration.





1. The codebasename attribute in your .ijp file is wrong. It must contain the full url to the file, so should look like this:


codebasename="http://hydra.vcp.monash.edu.au/ijc/projects.ijp"


But, if you are serving this up using HTTP you can actually omit the codebasename attribute altogether. It's necessary when opening it as a local file, but not when being accessed from web server.





2. The zip file with the project data should not contain the compactus9 directory. The files should start at the top level e.g. the .server directory should be a top level directory.





Hopefully with these changes you should be able to get it working.





BTW, we are creating a wizard in IJC that will created these files correctly for you which should simplify the process.








Tim

User 169b52bbd8

02-04-2008 02:31:46

Hi Tim,





That works now. Thanks for your help. I am still getting an error. I am not sure if this is related to my configuration files. The section from the log file follows:








org.dom4j.DocumentException: Error on line 1 of document : White spaces are required between publicId and systemId. Nested exception: White spaces are required between publicId and systemId.


at org.dom4j.io.SAXReader.read(SAXReader.java:339)


at org.dom4j.io.SAXReader.read(SAXReader.java:246)


at com.im.workbench.project.configuration.Configuration.parse(Configuration.java:278)








At one stage, after making some modifications to master.jnlp, I did get multiple installations of the project with new installations being produced each time I restarted IJC, but this has gone away now....





Regards





David

User 169b52bbd8

02-04-2008 02:53:46

Hi again Tim,





I have tried to distribute the IJC/Jchem licenses via the web server. I have made a license.dat file using the licenses taken from the academic web page. This file can be used to install the licenses through Help->licenses.





However, when I do this I get the error 'Installation license failed: content is not allowed in prolog'. I guess this means that the format of the license file is incorrect. Do you have instructions to generate the correct format?





David

ChemAxon fa971619eb

02-04-2008 07:41:44

The XML parsing error is slightly strange. Can you send me the .ijp file?





The license file you need for IJC 2.3 (and hence this development version of 2.3) is the new type if license file that is used with Marvin and JChem 5. Its an XML file. If you don't have one you should request one from sales _at_ chemaxon.com. Make sure you mention that you are using the 2.3 version or you will be sent the old style license file!





Tim

User 169b52bbd8

03-04-2008 00:50:18

Hi again Tim,





I now have the correct license file and the licensing seems to work on OSX and linux. I am still getting the error described previously. I have attached the master.jnlp, projects.ijp and the log file from the my OSX system.





The licenseinstallation does not work on Windows XP where I am getting the 'content is not allowed in prolog' error. The log file for that is attached also.





Once we get past all that, the next problem will be to distribute the login and password for MySQL. I can use a generic, read-only account for most users. As far as I can see, I can not control MySQL login through LDAP. Is it possible to set the database username/password through the projects file?





Thanks again,





David

ChemAxon fa971619eb

03-04-2008 19:35:04

David,





The problems with the XML files seem strange. Its possibly something to do with different line end characters on windows and linux/Mac.


Could you check the XML files for strange characters and ensure that they are valid XML?





The "Content is not allowed in prolog" is coming from the license file while the "White spaces are required between publicId and systemId" error is related to the projects.ijp file. We'll try to track it down from our end too.





The MySQL username/password are specified in the the contents of the project zip file (in the .ijs files within the .config directory). If you check the remember checkboxes against the username and password when you create the original connections they should get propagated into the project zip file. Its also possible to encrypt those details should you need to hide the information from your users.





Tim

ChemAxon 3b366b17e5

04-04-2008 06:56:20

David,
dkchalmers wrote:



The licenseinstallation does not work on Windows XP where I am getting the 'content is not allowed in prolog' error. The log file for that is attached also.


xml parser probably got xml file with invalid first character. Please try to open the xml file in "wordpad" (not in notepad), If you see strange character at the begining of file delete it. Delete also '<' char and retype it. The first line of the file is:





<?xml version="1.0" encoding="UTF-8"?>





Save the license file and deploy it. Please, let me know if it's working fine.





Thanks


Petr

ChemAxon fa971619eb

04-04-2008 10:09:00

David,





Also, take a look at this forum topic:


http://www.chemaxon.com/forum/ftopic3667.html





Tim

User 169b52bbd8

08-04-2008 00:27:32

Dear All,





I have had no luck with either of the error messages described. The license file problem is the more significant one. I have tried changing the line endings to dos, linux or unix. No funny characters are obvious using wordpad or vi. I tried removing the first line.





I fed both the license file and the master.jnlp file to an XML validator, and both are well-formed.





Does anyone have any other suggestions?





Cheers





David

ChemAxon 3b366b17e5

08-04-2008 06:25:36

David,


please try to delete folders with IJC webstart installation and userdir


C:\Documents and Settings\chalmers\.instantjchem\ws_installation_2.3


C:\Documents and Settings\chalmers\.instantjchem\ws_2.3





And try run IJC again. If it doesn't help I can send you privately update of library with installation of license. My email is petr.zajac _at_ gmail.com.





Thanks


Petr

User 169b52bbd8

08-04-2008 06:51:08

Petr,





Magic!





That is clearly the problem. The license installs correctly now.





Thanks Petr and everyone for your assistance.





David