6.1 About the Utility

The JCo Test utility completes the following checks:

The following sections help you use the utility.

6.1.1 Utility Prerequisites

Before you run the JCo Test utility, you must install the SAP JCo client for the desired platform. The JCo can only be obtained from the SAP Service Marketplace Web site. The download is free to any SAP software customer or development partner, but you are required to log in.

In order to configure the driver, you must first download the SAP JCo 3 and install it. For installation instructions, refer to the documentation accompanying the SAP JCo.

Follow the installation instructions for your platform. Each installation requires you to set one or two environment variables, such as CLASSPATH for the sapjco3.jar file location. For the UNIX platforms, set either the LD_LIBRARY_PATH or LIBPATH variables for the location of native support libraries. Ensure that these variables are set in the shell environment to run this test and for the subsequent use of the Identity Manager Driver for User Management of SAP Software.

You must also make sure that you have your PATH environment variable set to include the path to your Java executable file. For Win32* platforms, the environment variables are set via the System configuration in the Control Panel. On UNIX systems, edit the appropriate .profile or .bash_profile to include and export these path variables.

6.1.2 Components

The JCo Test utility consists of the UserJCO3Test.class file. The format of an execution batch or script file varies, depending on the platform on which the JCo client has been installed.

The basic content of the file includes a path to the Java executable (or just java if your PATH is appropriately configured), and the name of the UserJCO3Test.class file. A sample UNIX script file and Win32 batch file are listed below, where sapjco3.jar is in the executable directory of the UserJCOTest3.class file and the batch file:

Win32 jcotest.bat file
java -classpath %CLASSPATH%;. UserJCO3Test

Unix jcotest file
java UserJCO3Test

You must use proper slash notation when specifying pathnames, and you must use the proper classpath delimiter for the platform. You must also remember that the name of the sapjco3.jar file is case-sensitive on UNIX platforms and that the name of the test class, UserJCO3Test, must be specified with proper case for any platform.

6.1.3 Running and Evaluating the Test

Running the Test

To run the JCo Test utility on a Win32 platform:

  1. From Windows Explorer, double-click UserJCO3Test.bat. or From a command prompt, run the UserJCO3Test.bat script.

To run the JCo Test utility on a UNIX platform:

  1. From your preferred shell, run the userjco3test script file.

NOTE:When you run the test program, an error message might appear before any test output is displayed. This indicates an improper installation of the JCo client components. The error messages are documented for each platform in Understanding Test Error Messages.

Evaluating the Test

If the JCo client is installed properly, the following output is displayed:

**The SAP JCO client installation has been verified to be correct.

Version of the JCO-library: version information
Input SAP Server Connection Information
----------------------------------------

You then receive a series of prompts for connection and authentication information. All data must be provided unless a default value, identified by [] delimiters, is provided. Failure to fill in a response value to each prompt ends the test. Enter the following when prompted:

  • Application server name or IP address

  • System number [00]

  • Client number

  • User

  • User password

  • Language code [EN]

The values you provide are the same values that could be used to authenticate via the SAPGUI client. Based on the validity of the input, the test either displays error messages with solution suggestions or runs to completion. At the end of the test, a status message displays. If the test indicates full functionality as required by the driver, the following status message appears (it describes valid values that can be used as the configuration parameters for the driver):

JCO Test Summary
----------------
The following parameters might be used for SAP User Management Driver Configuration

Authentication ID: Username
Authentication Context: SAP Host Name/IP Address
Application Password: User password
SAP System Number: System Number
SAP User Client Number: Client Number
SAP User Language: Language Code
SAP System ID: System ID
Character Set Encoding: Encoding
All required BAPI and RFC Functionality has been verified.

If the test indicates that the functionality required by the driver is not available, the following status message is displayed:

JCO Test Summary
----------------
BAPI and RFC support is not complete. Review function list for details.

Full driver functionality is not possible if all functions are not available on the target SAP server. Patch the SAP server as needed.

Post-Test Procedures

After the JCo Test utility has successfully passed all tests, you can then begin to configure the driver. Make sure that the sapjco3.jar file is copied to the location where the sapumshim.jar file has been installed.

On UNIX systems, ensure that the environment variables used for the successful completion of the User JCo Test are also in the environment of the driver. If these conditions are met, there should be no driver errors that are related to the JCo.

6.1.4 Understanding Test Error Messages

Use the information in this section to analyze error messages that might display during the User JCo Test.

Table 6-1 General Errors

Error Message

Problem

Caught Exception during connection: java.ang.Exception: SAP Connection Exception: com.sap.coon.jco.JCoException: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed

Bad address or system number.

Caught Exception during connection: java.lang.Exception: SAP Connection Exception: com.sap.conn.jco.JCoException: (101) RFC_ERROR_PROGRAM: ‘client’ needs to be a three digit number string instead of ‘<input>’

Bad client number format.

Caught Exception during connection: java.lang.Exception: SAP Connection Exception: com.sap.conn.jco.JCoException: (101) RFC_ERROR_PROGRAM: ‘sysnr’ needs to be a two digit number string instead of ‘<input>’

Bad number format.

Caught Exception during connection: java.lang.Exception: SAP Connection Exception: com.sap.conn.jco.JCoException: (109) RFC_ERROR_CANCELLED: Handle closed pending

Invalid credentials (JCo 3.0.1).

Caught Exception during connection: java.lang.Exception: SAP Connection Exception: com.sap.conn.jco.JCoException: (103) RFC_ERROR_LOGON_FAILURE: Name or password is incorrect (repeat logon) on <host> sysnr <system number>

Invalid credentials (JCo 3.0.2+).

Caught Exception during connection: java.lang.Exception: SAP Connection Exception: com.sap.conn.jco.JCoException: (103) RFC_ERROR_LOGON_FAILURE: Selection one of the installed languages on <host> sysnr <system number>

Invalid Language code.

.java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

Caught Exception during connection: java.lang.Exception: SAP Connection Exception: java.lang.NoClassDefFoundError: com.sap.conn.rfc.driver.CpicDriver

Native middleware library not installed properly 3.0.1.

java.lang.ExceptionInInitializerError: Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: com.sap.conn.rfc.driverCpicDriver.nativeCpicGetVerstion([I)I Verify proper installation of JCo Native support libraries packaged with JCo client

Exception while initializing JCo client 3.0.2+.