How to install SAP JCo3 for IDM on SLES 11 easily

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): https://websmp105.sap-ag.de/~sapidb/011000358700007415502002E/#2

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


  2. 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???)

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


  4. Add an ldconfig deamon conf file for that generic path:
    echo /opt/sap/jco3 > /etc/ld.so.conf.d/sap-jco3.conf

    and run
    ldconfig -v | grep sap

    to update the LD_LIBRARY_PATH and activate your JCo3 installation

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

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Comments
Works also with Sles 12
and do not forgot to export the variable SECUDIR
here export SECUDIR=/opt/sap/jco3
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2015-07-28 18:59
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.