4.1 About the Utility

The JCO Test utility completes the following checks:

4.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 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 sapjco2.jar or 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.

4.1.2 Components

The JCO Test utility consists of the UserJCO2Test.class and UserJCO3Test.class files. 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 files include a path to the Java executable (or just java if your PATH is appropriately configured), and the name of the UserJCO2Test.class and UserJCO3Test.class files. A sample UNIX script file and Win32 batch file are listed below, where sapjco2.jar is in the executable directory of the UserJCO2Test.class file and sapjco3.jar is in the executable directory of the UserJCO3Test.class file and the batch file:

  • UserJCO2Test.class: The sapjco2.jar is in the executable directory of the UserJCO2Test.class file and the batch file.

    Win32 jcotest.bat file
    java -classpath %CLASSPATH%;. UserJCO2Test
    
    Unix jcotest file
    java UserJCO2Test
    
    
  • UserJCO3Test.class: The sapjco3.jar is in the executable directory of the UserJCO3Test.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 sapjco.jar or sapjco3.jar file is case-sensitive on UNIX platforms and that the name of the test class, UserJCOTest or UserJCO3Test, must be specified with proper case for any platform.

4.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 UserJCOTest.bat. or From a command prompt, run the UserJCOTest.bat script.

To run the JCO Test utility on a UNIX platform:

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

NOTE:It is possible that when you run the test program, an error message appears 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):

**All expected platform support is verified correct.
JCO Test Summary
----------------
Full JCO/BAPI Functionality has been verified.
The following parameters may be used for 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

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

**There are <number> required BAPI functions NOT supported on this platform.

JCO Test Summary
----------------
JCO/BAPI functionality issues have been detected that will prevent proper driver functionality.

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 sapjco.jar file is copied to the location where the sapusershim.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.

4.1.4 Understanding Test Error Messages

Use the information in this section to analyze error messages that might display during the User JCO Test. Some errors are applicable to all platforms, and other errors are platform-specific.

The test has been run on the platforms listed below. Other UNIX platforms supported by the JCO are configured in a similar manner and errors generated by improper JCO installation and configuration should be similar to the errors described below. Because of periodic modifications of the JCO, messages might not be exactly as shown.

JCO2

General Errors

Error Message

Problem

Error connecting to SAP host: com.sap.mw.jco.JCO$Exception: (102)

RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed .... Check values of Application Server Name/IP Address and System Number

This indicates that one or both of the values entered for the Application Server Name or IP Address and System Number are incorrect.

Verify that these values are consistent with the information found in the Properties page of the SAP Logon dialog box used to connect to the SAP R/3 system.

Error authenticating to SAP host: com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: You are not authorized to logon to the target system (error code 1).

The authentication credentials are not valid. Verify that the values for Client Number, User, and User Password are correct.

Error connecting to SAP host: com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: Language ’<value>’ not availableCheck value of Language Code

The language code selected is not valid or is not installed on the SAP R/3 system.

Errors on Win32 Systems

Error Message

Problem

'userjcotest' is not recognized as an internal or external command, operable program, or batch file.

The userjcotest.bat batch file is not present.

Exception in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$AbapExceptionor Exception in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception

The sapjco.jar file is not in the location specified in the userjcotest.bat batch file.

Exception while initializing JCO client.java.lang. UnsatisfiedLinkError: no jRFC12 in java.library.path.

Verify proper installation of JCO Native support libraries packaged with JCO client.

The jRFC12.dll file that shipped with the JCO client is not installed or is installed in an incorrect location. The default location for jRFC12.dll and libRfc32.dll is /winnt/system32.

Exception while initializing JCO client.java.lang. UnsatisfiedLinkError: C:\WINNT\system32\jrfc12.dll: Can’t find dependent libraries.

Verify proper installation of JCO Native support libraries packaged with JCO client.

The librfc32.dll file shipped with the JCO client is not installed or is installed in an incorrect location. The default location for jRFC12.dll and libRfc32.dll is /winnt/system32.

Errors on IBM-AIX Systems

Error Message

Problem

ksh: userjcotest: not found.

The userjcotest script file is not present in the directory.

Exception in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$AbapExceptionorException in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception

The sapjco.jar file is not in the location specified in the jcotest script file or the case specified for sapjco.jar does not match the actual filename.

Exception while initializing JCO client.java.lang.UnsatisfiedLinkError: no jRFC12 (libjRFC12.a or .so) in java.library.pathVerify proper installation of JCO Native support libraries packaged with JCO client.

The libjRFC12.so file that shipped with the JCO client is not installed or is installed in an incorrect location. You must configure a LIBPATH environment variable to specify the location in which the file resides.

Exception while initializing JCO client.java.lang.UnsatisfiedLinkError: <path>/libjRFC12.so: A file or directory in the path name does not exist.

Verify proper installation of JCO Native support libraries packaged with JCO client.

The librfccm.so file shipped with the JCO client is not installed or is installed in an incorrect location. You must copy the file to the same location as libjRFC12.so or configure the LIBPATH environment variable to specify the location in which the file resides.

Errors on Solaris Systems

Error Message

Problem

ksh: userjcotest: not found.orbash: userjcotest: command not found

The userjcotest script file is not present in the directory.

Exception in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$AbapExceptionorException in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception

The sapjco.jar file is not in the location specified in the jcotest script file or the case specified for sapjco.jar does not match the actual filename.

Exception while initializing JCO client.java.lang.UnsatisfiedLinkError: no jRFC12 in java.library.pathVerify proper installation of JCO Native support libraries packaged with JCO client.

The libjRFC12.so shipped with the JCO client is not installed or is installed in an incorrect location. You must configure a LD_LIBRARY_PATH environment variable to specify the location in which the file resides.

Exception while initializing JCO client.java.lang.UnsatisfiedLinkError: <path>/libjRFC12.so: ld.so.1: <search-path>: fatal: librfccm.so: open failed: No such file or directoryVerify proper installation of JCO Native support libraries packaged with JCO client.

The librfccm.so file shipped with the JCO client is not installed or installed in incorrect location. You must copy the file to the same location as libjRFC12.so or configure the LD_LIBRARY_PATH environment variable to specify the location in which the file resides.

Errors on HP-UX Systems

Error Message

Problem

ksh: userjcotest: not found.orbash: userjcotest: command not found

The userjcotest script file is not present in the directory.

Exception in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$AbapExceptionorException in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception

The sapjco.jar file is not in the location specified in the jcotest script file or the case specified for sapjco.jar does not match the actual filename.

Exception while initializing JCO client.java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer ’com.sap.mw.jco.rfc.MiddlewareRFCno sapjcorfc in java.library.pathVerify proper installation of JCO Native support libraries packaged with JCO client.

The libjRFC12.sl file shipped with the JCO client is not installed or is installed in an incorrect location. You must configure a SHLIB_PATH environment variable to specify the location in which the file resides.

Exception while initializing JCO client.java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer ’com.sap.mw.jco.rfc.MiddlewareRFC . . .Verify proper installation of JCO Native support libraries packaged with JCO client.

The librfccm.sl file shipped with the JCO client is not installed or is installed in an incorrect location. You must copy the file to the same location as libjRFC12.sl or configure the SHLIB_PATH environment variable to specify the location in which the file resides.

Errors on Linux Systems

Error Message

Problem

ksh: userjcotest: not found.orbash: jcotest: command not found

The userjcotest script file is not present in the directory.

Exception in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$AbapExceptionorException in thread “main” java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$Exception

The sapjco.jar file is not in the location specified in the jcotest script file or the case specified for sapjco.jar does not match the actual filename.

Exception while initializing JCO client.java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer ’com.sap.mw.jco.rfc.MiddlewareRFCno jRFC12 in java.library.pathVerify proper installation of JCO Native support libraries packaged with JCO client.

The libjRFC12.so file shipped with the JCO client is not installed or is installed in an incorrect location. You must configure a LD_LIBRARY_PATH environment variable to specify the location in which the file resides

Exception while initializing JCO client.java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer ’com.sap.mw.jco.rfc.MiddlewareRFC<path>/libjRFC12.so: librfccm.so: cannot open shared object file: No such file or directoryVerify proper installation of JCO Native support libraries packaged with JCO client.

The librfccm.so file shipped with the JCO client is not installed or is installed in an incorrect location. You must copy the file to the same location as libjRFC12.so or configure the LD_LIBRARY_PATH environment variable to specify the location in which the file resides.

JCO2

General Errors

Error Message

Problem

Error connecting to SAP host: com.sap.mw.jco.JCO$Exception: (102)

RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed .... Check values of Application Server Name/IP Address and System Number

This indicates that one or both of the values entered for the Application Server Name or IP Address and System Number are incorrect.

Verify that these values are consistent with the information found in the Properties page of the SAP Logon dialog box used to connect to the SAP R/3 system.

Error authenticating to SAP host: com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: You are not authorized to logon to the target system (error code 1).

The authentication credentials are not valid. Verify that the values for Client Number, User, and User Password are correct.

Error connecting to SAP host: com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: Language ’<value>’ not availableCheck value of Language Code

The language code selected is not valid or is not installed on the SAP R/3 system.