Windows Service JchemCartridgeService was not created

User 44b96ebc9a

11-01-2011 09:35:05

The Windows Service JchemCartridgeService was not created.


I tried to crate it with the command “install-interact.bat --jcserver-only”, but no success.


 Could you give me an advice how I can create this service please?

ChemAxon aa7c50abf8

11-01-2011 12:04:49

Could you, please, post the console output of the installer, as well as the JChem Cartridge version?

User 44b96ebc9a

12-01-2011 11:15:13

Console output of installer:


Microsoft Windows [Version 5.2.3790]


(C) Copyright 1985-2003 Microsoft Corp.


C:\Documents and Settings\oracle>cd ../..


C:\>cd "Program Files"


C:\Program Files>cd ChemAxon


C:\Program Files\ChemAxon>cd JChem


C:\Program Files\ChemAxon\JChem>cd cartridge


C:\Program Files\ChemAxon\JChem\cartridge>install-interact.bat --jcserver-only


Name of the Oracle host. [localhost]:


Oracle listener port [1521]:


Name of the Oracle instance [mydb]: BSLDB1P


The host name of the JChem Server [localhost]:


The port at which the JChem Server accepts connections [1099]:


maximum memory allocated to JChem Server [700m]:


INFO: Checking JChem Server at localhost:1099...


You have entered the following parameters:


==========================================


Name of the Oracle host.: localhost


Oracle listener port: 1521


Name of the Oracle instance: BSLDB1P


The host name of the JChem Server: localhost


The port at which the JChem Server accepts connections: 1099


maximum memory allocated to JChem Server: 700m


Proceed with the Install? (y,n) [n]: y


===============================


INSTALL SUCCESSFULLY COMPLETED.


===============================


C:\Program Files\ChemAxon\JChem\cartridge>


 


The version of Oracle is 5.2.6.


Thsi looked as though the install worked but the Service wa still not installed.

ChemAxon aa7c50abf8

12-01-2011 16:19:45

This is a bug in JChem 5.2.6 indeed. In later JChem versions this bug has been fixed. (I have now specifically tested with 5.4.0.1.)

User 44b96ebc9a

13-01-2011 13:54:22

Thank you for this response.


Could I please ask under what circumstances this bug is observed? Ie. Machine environment and setup.


I need to advise a customer how they may get the Servise installed, and using a later version of JChem is not an option at this time as JChem as we have not run internal tests with any other versions and currently have no plans to.


Thanks.

ChemAxon aa7c50abf8

14-01-2011 10:10:30

I tested this on Windows XP 32 bit with SP3.


Now I've double checked on Windows 7 and it installs OK.


What platform does your customer have?

ChemAxon aa7c50abf8

14-01-2011 10:29:00

I've tested JChem 5.4.0.1 on the same platform where 5.2.6 fails (Windows XP 32 bit SP3) and 5.4.0.1 installs the Windows service as well.


I suggest to try the following:


1. Download the platform independent JChem package of 5.4.0.1 and unzip it next to the 5.2.6 package (so the two packages are siblings in the same parent directory).

2. Execute .\install.bat --jcserver-only in the cartridge directory of the 5.4.0.1 package. This will create the windows service.

3. Edit the service parameters in the Windows registry (regedit.exe):

    3.1. Find the "Apache Software Foundation" node (without the quotes) in the registry. (On Windows 7, it is a sub-node of HKEY_LOCAL_MACHINE / SOFTWARE / Wow6432Node).

    3.2 Go further down into the Procrun 2.0 / JChemCartridgeService / Parameters sub-node.

    3.3 Iterate through the parameters (Java, Log, Start, Stop) end edit all directory paths referring to the directory of the 5.4.0.1 JChem package to refer the 5.2.6 directory. For example, if the 5.2.6 package is in C:\Users\Administrator\chemaxon\packages\jchem-5.2.6 and the 5.4.0.1 package is in C:\Users\Administrator\chemaxon\packages\jchem-5.4.0.1, replace all occurrences of C:\Users\Administrator\chemaxon\packages\jchem-5.4.0.1 in parameter value strings with C:\Users\Administrator\chemaxon\packages\jchem-5.2.6. For example, replace C:\Users\Administrator\chemaxon\packages\jchem-5.4.0.1\lib\jchem.jar with C:\Users\Administrator\chemaxon\packages\jchem-5.2.6\lib\jchem.jar.

Note that you can delete the JChemCartridgeService by executing the

prunsrv.exe //DS//JChemCartridgeService

command in the cartridge directory.

User 80ebabcb4a

20-01-2011 12:28:28

I've followed your instructions and get the following when trying to run our application which uses JChem...


SQL> select jchem.jchem_core_pkg.getenvironment() from dual;
select jchem.jchem_core_pkg.getenvironment() from dual
       *
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.rmi.ServerException: RemoteException occurred in server thread; nested
exception is:
java.rmi.RemoteException: No password found for user 'VDB_ADMIN'. Please, set
password by calling jchem_core_pkg.use_password or jchem_core_pkg.set_password.
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 27
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 90


Could this be caused by new functionality in JChem 5.4.0.1?


If I start the 5.2.6 JChem cartridge service from the commandline, and try the same in SQL Plus - I get the following...


SQL> select jchem.jchem_core_pkg.getenvironment() from dual;
select jchem.jchem_core_pkg.getenvironment() from dual
       *
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.rmi.ConnectException: Connection refused to host: localhost; nested
exception is:
java.net.ConnectException: Connection refused
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 27
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 90


This was previously working before running the 5.4.0.1 install.


Is there not a way to register the server as a windows service (similar to installutil.exe in .Net)?


Cheers,


Ian

ChemAxon aa7c50abf8

20-01-2011 15:30:04

Hi Ian,


Regarding the first error message you reported:


Did you set a password for the JChem Server to connect back to Oracle? That is: did you call either jchem_core_pkg.use_password or jchem_core_pkg.set_password; or did you set the oracle.server.login and oracle.server.password properties in cartridge/conf/jcart.properties?


The second error message (before the Windows service installation) basically indicates that JChem Server is not running (at least not [at the port] where it is expected). So I guess you have made progress...


If calling jchem_core_pkg.use_password doesn't help could you check the following, please:



 


Is there not a way to register the server as a windows service (similar to installutil.exe in .Net)?

For earlier JChem Cartridge versions (prior 5.2) we suggested the following procedure:


Windows users may want to install JChem Server as a Windows NT service, if they
want JChem Server to automatically start whenever Windows is (re)started.
Microsoft offers a simple way to create a Windows NT user-defined service for
Windows: http://support.microsoft.com/kb/137890 .

Please, follow the instructions up to step 6. in the referenced knowledge base
article. In step 5., use the path to the server.bat file as the
<path> component and server.bat as the
<application.ext> component.
In addition to the Application value, you also have to add an
AppDirectory and an AppParameters value under the
Parameters key created in step 3. The AppDirectory value
must be the path to the server.bat file. The
AppParameters value must be start.


For the first time after you created the service, the service has to be started
manually using the Services program in the Administrative Tools program group
(or Windows has to be restarted). It will be automatically restarted after each
Windows restart.


Note that this procedure will not give you a true Windows NT service: it will
only make sure that JChem Server is started at each restart. You still should
call server.bat stop in the command line, if you want to stop the
service.


Cheers,


Peter

User 80ebabcb4a

21-01-2011 10:07:25

We set the password in jcart.properties.


 


The second problem only occured after installing 5.4.0.1 and manually starting the 5.2.6 server from the commandline. Before installing 5.4.0.1, I could start the service from the commandline and this would work...



SQL> select jchem.jchem_core_pkg.getenvironment() from dual;

JCHEM.JCHEM_CORE_PKG.GETENVIRONMENT()
-----------------------------------------------------------------------

Oracle environment:
Oracle Database 10g Release 10.2.0.4.0 - Production
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

JChem Server environment:
Java VM vendor: Sun Microsystems Inc.
Java version: 1.6.0_18
Java VM version: 16.0-b13

JCHEM.JCHEM_CORE_PKG.GETENVIRONMENT()
-----------------------------------------------------------------------

JChem version: 5.2.6
JChem Index version: 5020400
JDBC driver version: 11.1.0.7.0-Production


 


...so it seems installing the 5.4.0.1 cartridge and changing registry has stopped the 5.2.6 service working properly.

ChemAxon aa7c50abf8

21-01-2011 10:23:08

 


...so it seems installing the 5.4.0.1 cartridge and changing registry has stopped the 5.2.6 service working properly.

Did you already have a Windows Service for 5.2.6?

User 80ebabcb4a

21-01-2011 10:26:15

Not a windows service (i.e. controlled through service.msc) - but we could start the service from the command prompt using:


C:\Program Files\ChemAxon\JChem\cartridge> server.bat start

ChemAxon aa7c50abf8

21-01-2011 10:33:24

I see.


You have a Windows Service now.




User 80ebabcb4a

21-01-2011 10:53:23

The contents of server.stderr is refreshed every time I stop/start the service:-


INFO: Server control process started
INFO: Using classpath: C:\Program Files\ChemAxon\JChem\lib\jchem.jar;
INFO: Server process start-ed.
INFO: Listening on network interface 0.0.0.0/0.0.0.0 at port 1099...


jcart0.log:-


21-Jan-2011 10:49:02 chemaxon.jchem.cartridge.server.Bootstrapper main
INFO: Server control process started
21-Jan-2011 10:49:02 chemaxon.jchem.cartridge.server.Bootstrapper createClasspath
INFO: Using classpath: C:\Program Files\ChemAxon\JChem\lib\jchem.jar;
21-Jan-2011 10:49:02 chemaxon.jchem.cartridge.server.Bootstrapper serverControl
INFO: Server process start-ed.


jcart1.log:-


21-Jan-2011 10:49:03 chemaxon.jchem.cluster.NodeManager run
INFO: Listening on network interface 0.0.0.0/0.0.0.0 at port 1099...


jcart2.log:-


21-Jan-2011 10:49:01 chemaxon.jchem.cartridge.rmi.impl.AdminImpl main
INFO: Connecting to localhost:1099

ChemAxon aa7c50abf8

21-01-2011 10:57:42

You have a perfectly working Windows Service then.


C:\Program Files\ChemAxon\JChem is where JChem 5.2.6 resides, correct?

User 80ebabcb4a

21-01-2011 11:07:14

Correct.


When I start the service from the commandline - nothing is written to the logfiles, but the following is output to the cmd prompt:-


C:\Program Files\ChemAxon\JChem\cartridge>server start

C:\Program Files\ChemAxon\JChem\cartridge>"c:\Program Files\java\jdk1.6.0_18\bin
\java.exe" -server -Xrs -XX:-OmitStackTraceInFastThrow -Dchemaxon.jchem.cartridg
e.config.file="C:\Program Files\ChemAxon\JChem\cartridge\\conf\jcart.properties"
 -Djava.util.logging.config.class=chemaxon.jchem.cartridge.util.LoggingConfigura
tor -Djava.awt.headless=true -classpath "C:\Program Files\ChemAxon\JChem\lib\jch
em.jar"  chemaxon.jchem.cartridge.server.Bootstrapper start
INFO: Server control process started
INFO: Using classpath: C:\Program Files\ChemAxon\JChem\lib\jchem.jar;
INFO: Server process start-ed.
INFO: Listening on network interface 0.0.0.0/0.0.0.0 at port 1099...

ChemAxon aa7c50abf8

21-01-2011 15:29:40

For the record:


During a brief investigation off-line we found that one of the paths in the registry required by the Windows service was still pointing to the directory of the 5.4 JChem package rather than to that of the 5.2.6 package. After fixing this, the getenvironment test went through as expected.


We also suggested to look at a recent forum topic which includes a sample command to create the Windows Service.

User 80ebabcb4a

21-01-2011 16:02:24

I confirm that the instructions using 5.4.0.1 did work, and that the method mentioned in the other forum post is our preferred solution - running the following command (with all the appropriate paths subsituted for the local system):-


"C:\Program Files\ChemAxon\JChem\cartridge\prunsrv.exe" //IS//JChemCartridgeService5 --DisplayName="JChem Cartridge Service5" --Install="C:\Program Files\ChemAxon\JChem\cartridge\prunsrv" --JavaHome="C:\Program Files\Java\jdk1.6.0_18" --Jvm="C:\Program Files\Java\jdk1.6.0_18\jre\bin\server\jvm.dll" --JvmOptions="-Xrs#-Doracle.home=null#-Dchemaxon.jchem.cartridge.config.file=C:\Program Files\ChemAxon\JChem\cartridge\conf\jcart.properties" --Classpath="C:\Program Files\ChemAxon\JChem\lib\jchem.jar" --StartMode=jvm --StopMode=jvm --StartClass=chemaxon.jchem.cartridge.server.Bootstrapper --StartParams=start --StartPath="C:\Program Files\ChemAxon\JChem\cartridge" --StopClass=chemaxon.jchem.cartridge.server.Bootstrapper --StopParams=stop --StopPath="C:\Program Files\ChemAxon\JChem\cartridge" --StdOutput="C:\Program Files\ChemAxon\JChem\cartridge\logs\server.stdout" --StdError="C:\Program Files\ChemAxon\JChem\cartridge\logs\server.stderr"


Thanks for your help Peter!