How to install SAP JCo3 for IDM on SLES 11 easily

NetIQ Identity Manager (IDM) can connect to SAP systems in several ways. Both the SAP-HCM and the SAP User Management drivers require a SAP middleware called „SAP Java Connector“, „JCo3“ in short, to be installed and configured in addition to the IDM driver. NetIQ Documentation does not explain this in detail and only refers to the SAP connectors website:
Installing the SAP Java Connector Client

The server where the SAP driver is installed must have the SAP Java Connector (JCO) client technology version 3.x to provide the driver with connectivity to the SAP system.

This JCO client is available to SAP customers and developer partners through SAP, and is provided for most popular server operating systems. You can download the JCO from the SAP Connectors site.

Following that link, it’s still quite a way to go until you can finally download the JCo3 files for your platform. First of all, you need to create an account to download, which requires you to be SAP Partner or Customer and know your Partner/Customer ID for registration. You will probably have to ask your SAP admins for the ID or have them create a support portal account for you.

Once you can log in, you still need to find your way from the above link to the actual download page, which IMHO is all but intuitive, so here’s an URL that get’s you there directly (at the time of writing):

Now download the JCo3 zip archive for your platform and resist the urge to also download the documentation PDFs available there. Why? Because all they tell you about the installation steps is to look for them inside the zip archive. So unzip and open the contained javadoc/installation.html file to find the following instructions:
To install JCo for Linux copy the appropriate distribution package into an own arbitrary directory {sapjco3-install-path}. Next, change to the installation directory:

cd {sapjco3-install-path} [return]

and extract the archive:

tar zxvf sapjco3-linux*3.0.13.tgz [return]

Then add {sapjco3-install-path} to the LD_LIBRARY_PATH environment variable.
Finally, add {sapjco3-install-path}/sapjco3.jar to your CLASSPATH environment variable.

Very generic. And how do you best add something to LD_LIBRARY_PATH, btw.?

So here’s what I found to be a good way to install the JCo3 libs for IDM on SLES 11:

  1. Create an install folder for the JCo3 version you downloaded, e.g. for the version current at time of writing:
    mkdir -p /opt/sap/jco-3.0.13

  • Download/copy/move the JCo3 zip archive to that older und extract it:
    cd /opt/sap/jco-3.0.13
    unzip sapjco3*zip
    tar xzvf sapjco3*tgz

    (yes, they’ve put a *tgz inside a *zip for distribution, why not???)

  • Create a generic symlink for easier updates to future JCo3 versions:
    ln -s /opt/sap/jco-3.0.13 /opt/sap/jco3

  • Add an ldconfig deamon conf file for that generic path:
    echo /opt/sap/jco3 > /etc/

    and run
    ldconfig -v | grep sap

    to update the LD_LIBRARY_PATH and activate your JCo3 installation

  • Finally add a symlink to the sapjco3.jar file to your IDM installation (same for both engine and remote loader installations):
    ln -s /opt/sap/jco3/sapjco3.jar /opt/novell/eDirectory/lib/dirxml/classes/

    (since IDM loads all classes in this folder, there’s no need to explicitly add the sapjco3.jar to it’s classpath as mentioned in the JCo3 install instructions)

That’s it, now you should be able to run the JCO3Test tool coming with the SAP HCM shim or the corresponding UserJCO3Test tool from the SAP UM shim:
idv:~ # cd /opt/novell/eDirectory/
idv:/opt/novell/eDirectory # lib64/nds-modules/jre/bin/java -cp lib/dirxml/classes/sapjco3.jar:lib/dirxml/rules/saphr/ JCO3Test

** The SAP JCO client installation has been verified to be correct.
Version of the JCO-library:3.0.13 (2015-04-27)
Input SAP Server Connection Information
Enter the Application Server Name or IP address:

If that's working for you, finally restart ndsd (if your driver is running in the IDM engine) or rdxml (if running in a remote loader, which is strongly recommended, even if it's installed on the same machine as the engine) to make your new JCo3 installation available to the SAP-HCM and SAP-UM shims as well.

Next time you want to update to a newer JCo3 version, just repeat steps 1 and 2 from above, update the symlink from step 3 and restart ndsd/rdxml. Done.

Any questions left unanswered? Please head over to the support forums and post them there.


How To-Best Practice
Comment List