Tomcat windows service not connecting to DB2
Hi,
I have installed CLM 3.0.1.1 on a 64 bit Windows 2008 R2 server.
The database is DB2 9.1 on z/OS and the application server is Tomcat.
When I start the server with server.startup.bat everything works fine,
but when I start it as a Windows 64-bit service it cannot find the DB2-driver:
"The configuration test resulted in errors. Resolve errors to continue.
ID CRJAZ1579E
The driver "com.ibm.db2.jcc.DB2Driver" could not be loaded and registered.
Support for some database vendors requires that the JDBC driver JAR be provided in a path configured by the server scripts.
If you are experiencing problems changing the database vendor, refer to the product setup instructions for more information.
ID CRJAZ0808I"
The installation instructions say nothing about where Tomcat finds the DB2-drivers.
If you use Oracle, you can set the DORACLE_JDBC_DRIVER_FILE variable but it seems that DB2 for z/OS is not supported
when you run Tomcat as a Windows service.
Has anyone ever tried to run CLM as a Windows service?
Thanks,
Ole N
I have installed CLM 3.0.1.1 on a 64 bit Windows 2008 R2 server.
The database is DB2 9.1 on z/OS and the application server is Tomcat.
When I start the server with server.startup.bat everything works fine,
but when I start it as a Windows 64-bit service it cannot find the DB2-driver:
"The configuration test resulted in errors. Resolve errors to continue.
ID CRJAZ1579E
The driver "com.ibm.db2.jcc.DB2Driver" could not be loaded and registered.
Support for some database vendors requires that the JDBC driver JAR be provided in a path configured by the server scripts.
If you are experiencing problems changing the database vendor, refer to the product setup instructions for more information.
ID CRJAZ0808I"
The installation instructions say nothing about where Tomcat finds the DB2-drivers.
If you use Oracle, you can set the DORACLE_JDBC_DRIVER_FILE variable but it seems that DB2 for z/OS is not supported
when you run Tomcat as a Windows service.
Has anyone ever tried to run CLM as a Windows service?
Thanks,
Ole N
9 answers
Hi Ole,
I could find these forum entries that might be related to your issue:
https://jazz.net/forums/viewtopic.php?p=71494
https://jazz.net/forums/viewtopic.php?p=60121
Please have a look.
Hi Ralph,
Unfortunately that did not help.
The startup batch file calls a SETENV.BAT file where you can set CLASSPATH, ie
set CLASSPATH=C:\PROGRA~2\ibm\JAZZTE~1\server\db2z\db2jcc.jar;
C:\PROGRA~2\ibm\JAZZTE~1\server\db2z\db2jcc_license_cisuz.jar;
C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar
If I don't set the classpath, Tomcat does not find the DB2-drivers.
Unfortunately, according to Tomcat documentation, classpath settings are ignored when Tomcat is
started as a Windows service.
You have to use some other way but the documentation does not say how to do it.
Thanks,
Ole N
Hi,
this is discussed in the online help under configuring and starting the server http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.jazz.install.doc/topics/t_run_rqm64_win_service.html.
When setting up and configuring the server you have to put the values into the service properties.
this is discussed in the online help under configuring and starting the server http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.jazz.install.doc/topics/t_run_rqm64_win_service.html.
When setting up and configuring the server you have to put the values into the service properties.
Hi,
this is discussed in the online help under configuring and starting the server http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.jazz.install.doc/topics/t_run_rqm64_win_service.html.
When setting up and configuring the server you have to put the values into the service properties.
Hi,
I have done that (does not work), but it says nothing about DB2 and where to put the DB2-drivers. The instructions only mention Derby, Oracle and SQL Server.
Thanks,
Ole N
Hi Ole,
this statement does not make sense to me. I have set up RTC as a Service, using the help, and it does indeed work as described in the help. So what am I missing?
I typically install on one machine RTC and DB2 for testing. So the drivers get installed when installing DB2. I have never added any special classpath entries for DB2. My assumption therefore is, if you installed the DB2 drivers on the machine and they are usable for the account running RTC and the user that connects RTC to DB2 there should be no issues. How to install the drivers for DB2 should be in the DB2 help e.g. http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=%2Fcom.ibm.db2.udb.apdv.java.doc%2Fdoc%2Ft0010264.htm.
If RTC runs from the batch, you are missing steps in the setup. The logs would probably point to what the issue is.
To bring up RTC as service, I typically fix all relative paths etc first and make sure the batch starts. Then I follow the help and carefully look at the logs. I typically had missed a parameter or a variable like Jazz_Home or had a typo, wrong path format.
Hi,
I have done that (does not work), but it says nothing about DB2 and where to put the DB2-drivers. The instructions only mention Derby, Oracle and SQL Server.
Thanks,
Ole N
this statement does not make sense to me. I have set up RTC as a Service, using the help, and it does indeed work as described in the help. So what am I missing?
I typically install on one machine RTC and DB2 for testing. So the drivers get installed when installing DB2. I have never added any special classpath entries for DB2. My assumption therefore is, if you installed the DB2 drivers on the machine and they are usable for the account running RTC and the user that connects RTC to DB2 there should be no issues. How to install the drivers for DB2 should be in the DB2 help e.g. http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=%2Fcom.ibm.db2.udb.apdv.java.doc%2Fdoc%2Ft0010264.htm.
If RTC runs from the batch, you are missing steps in the setup. The logs would probably point to what the issue is.
To bring up RTC as service, I typically fix all relative paths etc first and make sure the batch starts. Then I follow the help and carefully look at the logs. I typically had missed a parameter or a variable like Jazz_Home or had a typo, wrong path format.
Hi Ralph,
I dont use db2 LUW but DB2 for z/OS.
In a ReadMe file that came with RTC 2.0.0.2 I found this instruction:
"If you are using a DB2 database on z/OS,
the Jazz Team Server for System z and the Jazz Team Server for System z repository tools need access to
several JDBC license .jar files that are shipped with DB2 for z/OS.
To set access to the license files, complete the following steps:
- Create a directory called db2z under the JazzInstallDir/server directory.
- In the directory you created, save copies of the db2jcc_license_cisuz.jar and db2jcc.jar files from your system."
These instructions are omitted from newer installation media.
We installed Jazz Server 3.0.0 earlier and copied the DB2-driver files into the ./server/db2z folder.
Tomcat service found the driver files from folder .server/db2z and everything worked but user password synchronization with LDAP.
Therefore we had to start all over and removed version 3.0.0 and installed 3.0.1.1.
The logs contain no other error messages than:
"2012-02-02 14:10:46,397 ERROR .repository.service.db.provider.AbstractDbProvider
- CRJAZ1840W The driver "com.ibm.db2.jcc.DB2Driver" could not be loaded and registered.
This JDBC driver jar must be provided in a path configured by the server scripts.
Please ensure that the driver is in the expected location of
"C:\PROGRA~2\ibm\JAZZTE~1\server\db2z\db2jcc.jar;C:\PROGRA~2\ibm\JAZZTE~1\server\db2z\db2jcc_license_cisuz.jar;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar" or consult product setup instructions to change the location.
The path above is the same that is used in the bat-files.
Thanks,
Ole N
Hi Ralph,
I dont use db2 LUW but DB2 for z/OS.
In a ReadMe file that came with RTC 2.0.0.2 I found this instruction:
"If you are using a DB2 database on z/OS,
the Jazz Team Server for System z and the Jazz Team Server for System z repository tools need access to
several JDBC license .jar files that are shipped with DB2 for z/OS.
To set access to the license files, complete the following steps:
- Create a directory called db2z under the JazzInstallDir/server directory.
- In the directory you created, save copies of the db2jcc_license_cisuz.jar and db2jcc.jar files from your system."
These instructions are omitted from newer installation media.
We installed Jazz Server 3.0.0 earlier and copied the DB2-driver files into the ./server/db2z folder.
Tomcat service found the driver files from folder .server/db2z and everything worked but user password synchronization with LDAP.
Therefore we had to start all over and removed version 3.0.0 and installed 3.0.1.1.
The logs contain no other error messages than:
"2012-02-02 14:10:46,397 ERROR .repository.service.db.provider.AbstractDbProvider
- CRJAZ1840W The driver "com.ibm.db2.jcc.DB2Driver" could not be loaded and registered.
This JDBC driver jar must be provided in a path configured by the server scripts.
Please ensure that the driver is in the expected location of
"C:\PROGRA~2\ibm\JAZZTE~1\server\db2z\db2jcc.jar;C:\PROGRA~2\ibm\JAZZTE~1\server\db2z\db2jcc_license_cisuz.jar;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar" or consult product setup instructions to change the location.
The path above is the same that is used in the bat-files.
Thanks,
Ole N
Ran into the same issue today, the tomcat service needs the variable from the server.startup. script:
Windows example for DB2i and DB2z
So that additional option to the tomcat service configuration should make this work as expected.
-Sean
Windows example for DB2i and DB2z
if "%DB2I_ABSPATH%"=="" goto :default_db2i
set DB2I_JDBC=%DB2I_ABSPATH%
goto :after_db2i
:default_db2i
set DB2I_JDBC=%START_DIR%\db2i
:after_db2i
if "%DB2Z_ABSPATH%"=="" goto :default_db2z
set DB2Z_JDBC=%DB2Z_ABSPATH%
goto :after_db2z
:default_db2z
set DB2Z_JDBC=%START_DIR%\db2z
:after_db2z
...
set JAVA_OPTS=%JAVA_OPTS% -DDB2I_JDBC="%DB2I_JDBC%"
set JAVA_OPTS=%JAVA_OPTS% -DDB2Z_JDBC="%DB2Z_JDBC%"
So that additional option to the tomcat service configuration should make this work as expected.
-Sean