Rational Team Concert Server connection to a Microsoft SQL Server 2005/2008 when server is run with a Java 1.6 VM

Technote (troubleshooting)


Problem(Abstract)

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.

Symptom

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.

Cause

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.

Environment

  • Tomcat Server
  • Java 1.6 VM
  • Microsoft SQL Server 2005/2008

Diagnosing the problem

SERVER

  • 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:
    java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
  • If the following exception is shown, the driver that was found is not compatible with the Java 1.6 VM:


REPOTOOLS

  • 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.

  1. Stop the server.
  2. 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
  3. 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.
  4. 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
  5. Run >repotools-jts -verify and check that no exceptions are thrown.
  6. Run >repotools-jazz -verify and check that no exceptions are thrown.
  7. Start the server.
  8. 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.
  9. Navigate to the JTS admin console <server>/jts/admin. Click on the "Server" tab and ensure the "Database Status" is OK.
  10. 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.
  11. 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

Leverage the Jazz Community

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.
Refer to technote 1319600 for details and links.

Related information

(MS) Overview of the JDBC Driver
jazz.net work item 85497
Microsoft SQL Server JDBC Driver 2.0

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Team Concert
Repository

Software version:

2.0, 2.0.0.1, 2.0.0.2, 3.0

Operating system(s):

Windows

Reference #:

1391050

Modified date:

2010-12-01

Translate my page

Machine Translation

Content navigation