Rational Team Concert Server connection to a Microsoft SQL Server 2005/2008 when server is run with a Java 1.6 VM
The Rational Team Concert server and/or repotools are unable to find the correct SQL Server JDBC driver after upgrading Tomcat to use a Java 1.6 VM.
Server function is severely limited and most repotools commands will not work if the correct JDBC driver is not found. This problem can manifest itself in several ways:
- The server cannot find the SQL Server driver at all.
- The server is running Java 1.6 VM and using the Java 1.5 VM SQL Server driver.
- repotools cannot find the SQL Server driver at all.
- repotools is running Java 1.6 VM and using the Java 1.5 VM SQL Server driver.
- repotools is running Java 1.5 VM and using the Java 1.6 VM SQL Server driver.
There are two versions of the SQL Server JDBC driver.
- sqljdbc.jar works with the Java 1.5 VM.
- sqljdbc4.jar works with the Java 1.6 VM.
Note: Ensure you are using the Microsoft SQL Server JDBC Driver 2.0 drivers available from Microsoft Download Site.
- Tomcat Server
- Java 1.6 VM
- Microsoft SQL Server 2005/2008
Diagnosing the problem
- Navigate to the JTS setup wizard <server>/jts/setup and click Next until the "Configure Database" screen is shown.
- If the following exception is displayed, the JDBC driver cannot be found. attachment 53731. The server\logs\jts.log also contains the following exception:
- If the following exception is shown, the driver that was found is not compatible with the Java 1.6 VM:
- Run >repotools-<app> -verify
- If the following exception is shown at the command line, the driver cannot be found
CRJAZ1840W The driver "com.microsoft.sqlserver.jdbc.SQLServerDriver" 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 "E:\downloads\RTC\JTS+CCM-Win32_3.0.0.RTC-I20101118-1700\server\sqlserver\sqljdbc4.jar" or consult product setup instructions to change the location.
Resolving the problem
Note: It is important to verify both the server and repotools configuration.
Rational Team Concert 2.X Server
- Use a Java 1.5 VM.
- Rename the sqljdbc4.jar file to sqljdbc.jar so that the Jazz server will detect the JDBC driver correctly
Rational Team Concert 3.X Server
These instructions are written for Rational Team Concert 3.0 Servers running Microsoft Windows. Modify as appropriate for other platforms.
- Stop the server.
- Configure the following environment variable to point to the Java 1.6 VM version of the JDBC driver:
set SQLSERVER_JDBC_DRIVER_FILE=<path to JDBC jar>\sqljdbc4.jar
- Rename the server\sqlserver\sqljdbc.jar to server\sqlserver\sqljdbc.jar.bkup. This ensures that the Java 1.5 VM driver is not accidentally picked up instead of the Java 1.6 VM driver.
- Set both repotools-jts.bat and repotools-jazz.bat to point to the new JRE. Open each one and search for "set JAVA" and replace the existing path with the path to the Java 1.6 JRE, e.g. set JAVA=<path to 1.6 JRE>\jre\bin\java
- Run >repotools-jts -verify and check that no exceptions are thrown.
- Run >repotools-jazz -verify and check that no exceptions are thrown.
- Start the server.
- Navigate to the JTS setup wizard <server>/jts/setup and click Next until the "Configure Database" screen is shown. Ensure there are no errors when you test the database connection.
- Navigate to the JTS admin console <server>/jts/admin. Click on the "Server" tab and ensure the "Database Status" is OK.
- Navigate to the CCM setup wizard <server>/jazz/setup and click Next until the "Configure Database" screen is shown. Ensure there are no errors when you test the database connection.
- Navigate to the CCM admin console <server>/jazz/admin. Click on the "Server" tab and ensure the "Database Status" is OK.
Note: The CCM server context root might be different depending on if Rational Team Concert was installed from scratch, or if you're migrating from a previous version.
- installation from scratch: <server>/ccm
- migration: <server>/jazz
Jazz and Rational Team Concert have an active community that can provide you with additional resources. Browse and contribute to the User forums, contribute to the Team Blog and review the Team wiki.
Translate this page: