Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

tomcat windows service not connecting to derby database

Hi,

Scenario:
Running CLM 3.0.1 on a single server using a Derby db
Added a Tomcat windows service
Followed all the instructions on various posts and docs (modifying config files, properties files and tomcat5w.exe) etc.

Issue:
The windows service starts successfully but when I logon to <serverport>jts/admin nothing is visible. There are numerous errors but the one that stands out is:
CRJAZ1061I The database is responding, but the Jazz repository schemas and tables cannot be found. Check that the database JDBC location is correct. If this is a new database, stop the server and use the "repotools" command to create the tables.

If I stop the windows service and start Jazz/CLM from the start menu everything works fine.

I can't work out where the issue might be - it's obviously something to do with where Tomcat thinks the db is (or something like that).

Any help would be greatly appreciated!

Thanks,
Joe

0 votes



10 answers

Permanent link
Hi Joe,

the Derby DB has a relative path in the teamserver.properties by default. If you run Tomcat as a service, you need to provide an absolutee path. One of the frequent complaints in the logs AND IMPORTANT when running Tomcat as a service 8-).

BTW, Derby is not meant to be used as a production DB. You ahould consider running DB2 instead.

0 votes


Permanent link
Hi Joe,

the Derby DB has a relative path in the teamserver.properties by default. If you run Tomcat as a service, you need to provide an absolutee path. One of the frequent complaints in the logs AND IMPORTANT when running Tomcat as a service 8-).

BTW, Derby is not meant to be used as a production DB. You ahould consider running DB2 instead.


Hi Ralph,

Thanks for responding.
I've already made the path to the Derby repository (label: com.ibm.team.repository.db.jdbc.location) in the various teamserver.properties files.

Also, it's not being used for production - this is merely a PoC environment. I'd like to get it working properly though, hence my post.

Thanks,
Joe

0 votes


Permanent link
Hi Joe,

if the absolute path is set to the correct location and it is still not working I'd check the other parameters you need to set in the Tomcat service. I am not sure what could cause your symptoms in specific.

0 votes


Permanent link
I'm having the same problem as joewines. It's version 3.0.1, windows is server 2008 R2 x64. I already changed the teamserver.properties file to:
com.ibm.team.datawarehouse.db.jdbc.location=E:/IBM/JazzTeamServer/server/conf/jts/derby/repositoryDB
and the log4j.properties to
log4j.appender.file.File=E:/IBM/JazzTeamServer/server/logs/jts.log
Also, this step is not listed in the infocenter guide:
http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0/index.jsp?topic=/com.ibm.jazz.install.doc/topics/t_run_rqm64_win_service.html

here's some more info about the java part:
Version 1.5.0
Vendor IBM Corporation
Name IBM J9 VM
Details
J2RE 1.5.0 IBM J9 2.3 Windows Server 2008 R2 amd64-64 j9vmwa6423ifx-20100510 (JIT enabled)
J9VM - 20100509_57823_LEdSMr
JIT - 20091016_1845ifx7_r8
GC - 20091026_AA

0 votes


Permanent link
I fixed it! Here are my full installing tomcat as a web service instructions. They're based off the infocenter ones but include steps not listed. Make sure you replace <InstallDir> with your local install directory:

1. Remove any Windows service that is running Jazz Team Server. For example, to remove a service named 2.x, complete these steps:
a. Open a command prompt, and change to the <InstallDir>\server\tomcat\bin directory.
b. Enter
service.bat remove

c. Restart the computer. (not necessary if the service was not running when you removed it or if there was no service to remove)
If you are NOT installing on 64bit windows, skip to step 3
2. Go to the <InstallDir>\server\tomcat\bin directory, and rename tomcat5.exe to tomcat5.exe.32.
Copy tomcat5w.exe from either the tomcat\bin\i64 (Intel) or tomcat\bin\x64 (AMD) directory to the tomcat\bin directory. Note: Do not copy the tcnative-1.dll file.
3. Install the new service by opening a command prompt, changing to the <InstallDir>\server\tomcat\bin directory, and typing the following command:
service.bat install

4. If you are using Derby as your database, repeat these steps for each feature located in <InstallDir>\server\conf\ (I had ccm, jts, and qm):
a. open <InstallDir>\server\conf\<feature>\teamserver.properties
b. update the following values to be absolute paths:
com.ibm.team.repository.db.jdbc.location

com.ibm.team.fulltext.indexLocation
com.ibm.team.datawarehouse.db.jdbc.location

For example, in my jts file I made the following change:
com.ibm.team.repository.db.jdbc.location=C:/IBM/JazzTeamServer/server/conf/jts/derby/repositoryDB

Note the forward slash (/) in the path.
c. For the JTS log file, edit <InstallDir>\server\conf\jts\log4j.properties to make the value for the log4j.appender.file.File property an absolute path, such as
 log4j.appender.file.File=<InstallDir>/server/logs/jts.log
Note the forward slash (/) in the path.
5. Execute C:\jazz\server\tomcat\bin\tomcat5w.exe to configure the service.
Click the Java tab and clear the check box for Use default.
Add the following path to Java Virtual Machine. You can also click the ellipsis icon to browse for the jvm.dll file.
<InstallDir>\server\jre\bin\j9vm\jvm.dll

6. Add the following lines at the bottom of the Java Options text field
-DJAZZ_HOME=file:///<InstallDir>/server/conf

-Djava.awt.headless=true
-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true
-Dcom.ibm.team.repository.tempDir=%TEMP%
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///<InstallDir>/server/conf/startup_log4j.properties

If you are using Oracle database, add the following line:
-DORACLE_JDBC=[path to Oracle JDBC driver jar]

If you are using SQL Server database, also add the following line:
-DSQLSERVER_JDBC=[path to SQL Server JDBC driver jar]

7. Change the Maximum memory pool size to 4000.
8. On the Startup and Shutdown tabs, make sure that jvm is selected for the Mode setting.
9. Click the General tab and change the Startup type to Automatic if you want to start the service automatically when Windows starts.
10. Start the service to test the server. After the service starts, verify that the server is running by logging on to the server from your browser.

I hope this helps everyone who has been having problems getting tomcat installed as a service. And I really hope IBM steps their game up on their installation guides; this took me 2 days of researching, compiling all the different available guide, and some ingenuity to figure out what needed to be done.

0 votes


Permanent link
Thanks for the comprehensive instructions Phil.
I'm sure it'll be useful to others!

I fixed it! Here are my full installing tomcat as a web service instructions. They're based off the infocenter ones but include steps not listed. Make sure you replace <InstallDir> with your local install directory:

1. Remove any Windows service that is running Jazz Team Server. For example, to remove a service named 2.x, complete these steps:
a. Open a command prompt, and change to the <InstallDir>\server\tomcat\bin directory.
b. Enter
service.bat remove

c. Restart the computer. (not necessary if the service was not running when you removed it or if there was no service to remove)
If you are NOT installing on 64bit windows, skip to step 3
2. Go to the <InstallDir>\server\tomcat\bin directory, and rename tomcat5.exe to tomcat5.exe.32.
Copy tomcat5w.exe from either the tomcat\bin\i64 (Intel) or tomcat\bin\x64 (AMD) directory to the tomcat\bin directory. Note: Do not copy the tcnative-1.dll file.
3. Install the new service by opening a command prompt, changing to the <InstallDir>\server\tomcat\bin directory, and typing the following command:
service.bat install

4. If you are using Derby as your database, repeat these steps for each feature located in <InstallDir>\server\conf\ (I had ccm, jts, and qm):
a. open <InstallDir>\server\conf\<feature>\teamserver.properties
b. update the following values to be absolute paths:
com.ibm.team.repository.db.jdbc.location

com.ibm.team.fulltext.indexLocation
com.ibm.team.datawarehouse.db.jdbc.location

For example, in my jts file I made the following change:
com.ibm.team.repository.db.jdbc.location=C:/IBM/JazzTeamServer/server/conf/jts/derby/repositoryDB

Note the forward slash (/) in the path.
c. For the JTS log file, edit <InstallDir>\server\conf\jts\log4j.properties to make the value for the log4j.appender.file.File property an absolute path, such as
 log4j.appender.file.File=<InstallDir>/server/logs/jts.log
Note the forward slash (/) in the path.
5. Execute C:\jazz\server\tomcat\bin\tomcat5w.exe to configure the service.
Click the Java tab and clear the check box for Use default.
Add the following path to Java Virtual Machine. You can also click the ellipsis icon to browse for the jvm.dll file.
<InstallDir>\server\jre\bin\j9vm\jvm.dll

6. Add the following lines at the bottom of the Java Options text field
-DJAZZ_HOME=file:///<InstallDir>/server/conf

-Djava.awt.headless=true
-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true
-Dcom.ibm.team.repository.tempDir=%TEMP%
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///<InstallDir>/server/conf/startup_log4j.properties

If you are using Oracle database, add the following line:
-DORACLE_JDBC=[path to Oracle JDBC driver jar]

If you are using SQL Server database, also add the following line:
-DSQLSERVER_JDBC=[path to SQL Server JDBC driver jar]

7. Change the Maximum memory pool size to 4000.
8. On the Startup and Shutdown tabs, make sure that jvm is selected for the Mode setting.
9. Click the General tab and change the Startup type to Automatic if you want to start the service automatically when Windows starts.
10. Start the service to test the server. After the service starts, verify that the server is running by logging on to the server from your browser.

I hope this helps everyone who has been having problems getting tomcat installed as a service. And I really hope IBM steps their game up on their installation guides; this took me 2 days of researching, compiling all the different available guide, and some ingenuity to figure out what needed to be done.

0 votes


Permanent link
I fixed it!
...

I did exactly what you described. (At least I hope so)
The main difference in my case is that I have installed into the default directory on windows 7 64 bit system.

I have heard that the spaces in "Program Files (x86)" cause problems. Therefor I have tried the dos 8.3 notation PROGRA~2, too.

Here are the three lines of my teamserver.properties:
#This configuration update was requested by "pross".  The old contents of this file were copied to "C:\PROGRA~2\IBM\JAZZTE~1\server\conf\ccm\teamserver-1326287175145bakup.properties".

#Wed Jan 11 14:06:15 CET 2012
...
com.ibm.team.repository.db.jdbc.location=C:/PROGRA~2/IBM/JazzTeamServer/server/conf/ccm/derby/repositoryDB
com.ibm.team.fulltext.indexLocation=C:/PROGRA~2/IBM/JazzTeamServer/server/conf/ccm/indices/workitemindex
com.ibm.team.datawarehouse.db.jdbc.location=C:/PROGRA~2/IBM/JazzTeamServer/server/conf/jts/derby/warehouseDB


In both cases I get the error message following, when opening the project dashboard:
Report loading failed: CRJAZ0502I The connection could not be created (vendor="derby_net", location="C:/PROGRA~2/IBM/JazzTeamServer/server/conf/jts/derby/warehouseDB"

When I start the jts with the batch, the dashboard works fine.

0 votes


Permanent link
I fixed it!
...

I did exactly what you described. (At least I hope so)
The main difference in my case is that I have installed into the default directory on windows 7 64 bit system.

I have heard that the spaces in "Program Files (x86)" cause problems. Therefor I have tried the dos 8.3 notation PROGRA~2, too.

Here are the three lines of my teamserver.properties:
#This configuration update was requested by "pross".  The old contents of this file were copied to "C:\PROGRA~2\IBM\JAZZTE~1\server\conf\ccm\teamserver-1326287175145bakup.properties".

#Wed Jan 11 14:06:15 CET 2012
...
com.ibm.team.repository.db.jdbc.location=C:/PROGRA~2/IBM/JazzTeamServer/server/conf/ccm/derby/repositoryDB
com.ibm.team.fulltext.indexLocation=C:/PROGRA~2/IBM/JazzTeamServer/server/conf/ccm/indices/workitemindex
com.ibm.team.datawarehouse.db.jdbc.location=C:/PROGRA~2/IBM/JazzTeamServer/server/conf/jts/derby/warehouseDB


In both cases I get the error message following, when opening the project dashboard:
Report loading failed: CRJAZ0502I The connection could not be created (vendor="derby_net", location="C:/PROGRA~2/IBM/JazzTeamServer/server/conf/jts/derby/warehouseDB"

When I start the jts with the batch, the dashboard works fine.

so you tried using the path with spaces and it didn't work? you might want to try quoting the path instead of using the dos notation. i hope this helps!

0 votes


Permanent link
Unfortunately, that does not work, too.
Now the Database Status on the status summary pages shows this error message:
CRJAZ0502I The connection could not be created (vendor="derby", location=""C:/Program Files (x86)/IBM/JazzTeamServer/server/conf/ccm/derby/repositoryDB"").
...
you might want to try quoting the path instead of using the dos notation. i hope this helps!...

0 votes


Permanent link
Unfortunately, that does not work, too.
Now the Database Status on the status summary pages shows this error message:
CRJAZ0502I The connection could not be created (vendor="derby", location=""C:/Program Files (x86)/IBM/JazzTeamServer/server/conf/ccm/derby/repositoryDB"").
...
you might want to try quoting the path instead of using the dos notation. i hope this helps!...


I was struggling to get this going ..finally got it working today. I was getting tomcat started but was receiving a "discovery service not started" after login preventing me from getting to the jts menu

Here's what I have in the tomcat dialogue (replace the installation directories accoringly)

-Dcatalina.base=C:\JazzTeamServer3011\server\tomcat
-Dcatalina.home=C:\JazzTeamServer3011\server\tomcat
-Djava.endorsed.dirs=C:\JazzTeamServer3011\server\tomcat\common\endorsed
-Djava.io.tmpdir=C:\JazzTeamServer3011\server\tomcat\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=C:\JazzTeamServer3011\server\tomcat\conf\logging.properties
-DJAZZ_HOME=file:///C:/JazzTeamServer3011/server/conf
-Djava.awt.headless=true
-Dorg.eclipse.emf.ecore.plugin.EcorePlugin.doNotLoadResourcesPlugin=true
-Dcom.ibm.team.repository.tempDir=%TEMP%
-Djazz.connector.sslProtocol=SSL_TLS
-Djazz.connector.algorithm=IbmX509
-Dlog4j.configuration=file:///C:/JazzTeamServer3011/server/conf/startup_log4j.properties

in addition, I validate that there is no space at the end of any of the lines above (there were a couple) and no carriage return at the last line.

Next I made all paths absolute for the derby repositories in the teamserver.properties file even though I'm configured for DB2 - also put absolute paths on the workitem indexes.

Tomcat started up successfully and allowed me to login

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 7,592

Question asked: Dec 22 '11, 10:38 a.m.

Question was seen: 11,848 times

Last updated: Dec 22 '11, 10:38 a.m.

Confirmation Cancel Confirm