About place of file .jchem

User 72ba891f70

01-06-2007 14:04:34

Help me please.


Where program jcman or jcsearch search cofiguration file ".jchem" ?





I want to search the substructure in MySQL base. I write in CGI-program (on Perl) the string:





system('/room/ChemAxon/JChem/bin/jcsearch -q "C(O)NC" -o /home/hit.smi DB:conp_str');





When the CGI start from comand line (Red Hat Enterprise Linux 4) the result file "hit.smi" is created and had 27 items (lines). All right.


When the CGI start from Web-page the result file hit.smi is created too, but it had not items. In error_log is the string:





More properties needed to make the connection.





I thing that this problem is due to USER's name. The path of cofiguration file ".jchem" is "/root/.chemaxon/.jchem". When program start from comand line, the USER is "root" and program seek file ".jchem" in "/root/" folder. When one start from Web-page, the USER is "nobody" and it seek in "/nobody/" folder, but can not find such folder (and configuration file). Therefor can not make connection with base.





Please suggest me the solution this problem. How change the path for ".jchem"?

ChemAxon 9c0afc9aaf

04-06-2007 11:05:32

Quote:
Where program jcman or jcsearch search cofiguration file ".jchem" ?
http://www.chemaxon.com/jchem/doc/admin/





Code:
JChemManager stores user-specific settings in the .jchem file located under the .chemaxon (UNIX / Linux) or chemaxon (Windows) subdirectory in the user's home directory.
Quote:
Please suggest me the solution this problem. How change the path for ".jchem"?
Currently there is no option to directly influence the search path.


I suggest one of the following:


- copy the .jchem file to the other location


or


- specify all connection parameters from command line for the script (see "jcman --help" for the necessary arguments)


or


- override the user home in the jcman script:


Code:
java -Duser.home=/root ...






Best regards,





Szilard

ChemAxon 9c0afc9aaf

04-06-2007 11:12:56

PS:





Using jcsearch is not the most efficient way to search in a database, since


- a new Java Virtual Machine is started each time


- the structure cache is loaded for the whole table each time





If you have some Java experience using JSP would be much more efficient.





Please see our database JSP example:





http://www.chemaxon.com/jchem/examples/db_search/index.jsp





The source of this simple web application can be found in the jchem package under "examples/db_example" with installation instructions in "setup.html"





Szilard

User 72ba891f70

04-06-2007 13:17:10

Thank you for help, Szilard.





I have soluted the problem with .jchem in Perl CGI.


But your variant on Java is very interesting. I know Java and may be use your advice.





Best regards,


Alex