Unable to connect to StarTeam Server and CaliberRM Server simultaneously using SDK

0 Likes

Problem:

Unable to connect to StarTeam Server and CaliberRM Server simultaneously using SDK

Resolution:

  • Product Name: StarTeam
  • Product Version: 2005 R2, 2006, 2006 R2
  • Product Component: SDK
  • Platform/OS Version: Windows

    Question:

    While writing codes using StarTeam and CaliberRM SDK to connect to a StarTeam Server and a CaliberRM Server one after another, the below situations happen.

    1. If StarTeam Server is connected first, followed by CaliberRM Server, the connection to CaliberRM Server will fail with the following error.

    =====================================================
    Run-time error "-2147467259 (80004005)":

    java.lang.NoClassDefFoundError: com/starbase/starteam/Server
    =====================================================

    2. If CaliberRM Server is connected first, followed by StarTeam Server, the connection to StarTeam Server will fail with the following error.

    =====================================================
    Run-time error "-2147467259 (80004005)":

    java.lang.NoClassDefFoundError: com/starbase/caliber/server/CaliberServer
    =====================================================


    Answer:

    These errors occur because the client application is unable to locate the Java classes for the 2nd Server to be connected.

    If an application uses multiple SDKs (eg. StarTeam SDK and Caliber SDK), then StInitializer (StarTeam) and Initializer (Caliber) objects must be created for each required SDK in the application"s startup sequence to ensure that the required Java classes for all SDKs will be available at runtime.

    Using a Visual Basic application as an example, this can be done by:

    1. Under Form Declaractions, define the following.

    Dim StInit As StarTeam.StInitializer
    Dim RMInit As CaliberRM.Initializer
    Dim StJavaConfig As StarTeam.IStJavaConfiguration
    Dim RmJavaConfig As CaliberRM.IStJavaConfiguration

    2. Under Form_Load, include the following statements.

StInit = New StarTeam.StInitializer
RMInit = New CaliberRM.Initializer
StJavaConfig = StInit.JavaConfiguration
RmJavaConfig = RMInit.JavaConfiguration



Author: Dixon Chan

Old KB# 27375
Comment List
Related
Recommended