IBM Support

Problem Determination for SAP JCo

Troubleshooting


Problem

The technote covers common problems with SAP JCo native libraries that are necessary for the WebSphere Adapter for SAP Software V6.x/7.0 and WebSphere Business Integration Adapter for mySAP.com 6.0.9.

Environment

The majority of the problems emerged on AIX, but might apply to other operating systems as well.

Resolving The Problem

Common problems with SAP JCo are load errors caused by missing libraries or incorrect installations SAP JCo.

A first step into debugging SAP JCo (load) errors is to perform the following preliminary checks. Thus, you can verify whether the version installed is the correct one or whether all environment variables are being set.

Preliminary Checks

1. Taken from the JCo Installation Guide, please find the name of the JCo file for versions 2.1.8/3.0.3 and the necessary environment variables below.


    Windows: PATH, CLASSPATH

    "

    JCo 2.1.8

      • sapjco-ntintel-2.1.8.zip for a 32-bit JRE running on a 32-bit INTEL x86 or a 64-bit INTEL Itanium processor
      • sapjco-ntia64-2.1.8.zip for a 64-bit JRE running on a 64-bit INTEL Itanium processor
      • sapjco-ntamd64-2.1.8.tgz for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor

    JCo 3.0.3
      • sapjco3-ntintel-3.0.3.zip for a 32-bit JRE running on a 32-bit AMD or INTEL x86 or a 64-bit INTEL Itanium processor
      • sapjco3-ntia64-3.0.3.zip for a 64-bit JRE running on a 64-bit INTEL Itanium processor
      • sapjco3-ntamd64-3.0.3.zip for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor
    "

    Linux: LD_LIBRARY_PATH, CLASSPATH

    "

    JCo 2.1.8

      • sapjco-linuxintel-2.1.8.tgz for a 32-bit JRE running on a 32-bit INTEL x86 processor
      • sapjco-linuxia64-2.1.8.tgz for a 64-bit JRE running on a 64-bit INTEL Itanium processor
      • sapjco-linuxppc64-2.1.8.tgz for a 64-bit JRE running on a 64-bit PowerPC processor
      • sapjco-linuxx86_64-2.1.8.tgz for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor
      • sapjco-linuxs390x-2.1.8.tgz for a 64-bit JRE running on a 64-bit IBM eServer zSeries processor

    JCo 3.0.3

      • sapjco3-linuxintel-3.0.3.tgz for a 32-bit JRE running on a 32-bit AMD or INTEL x86 processor
      • sapjco3-linuxia64-3.0.3.tgz for a 64-bit JRE running on a 64-bit INTEL Itanium processor
      • sapjco3-linuxx86_64-3.0.3.tgz for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor
      • sapjco3-linuxppc64-3.0.3.tgz for a 64-bit JRE running on a 64-bit PowerPC processor
    "

    Sun Solaris: LD_LIBRARY_PATH, CLASSPATH

    "

    JCo 2.1.8

      • sapjco-sun-2.1.8.tgz for a 32-bit JRE running on a 32- or 64-bit SUN SPARC processor
      • sapjco-sun_64-2.1.8.tgz for a 64-bit JRE running on a 64-bit SUN SPARC processor
      • sapjco-sunx86_64-2.1.8.tgz for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor

    JCo 3.0.3

      • sapjco3-sun_64-3.0.3.tgz for a 64-bit JRE running on a 64-bit SUN SPARC processor
      • sapjco3-sunx86_64-3.0.3.tgz for a 64-bit JRE running on a 64-bit AMD or INTEL x86 processor
    "

    IBM AIX: LIBPATH, CLASSPATH

    "

    JCo 2.1.8

      • sapjco-rs6000-2.1.8.tgz for a 32-bit JRE running on a 32- or 64-bit IBM RS/6000 processor
      • sapjco-rs6000_64-2.1.8.tgz for a 64-bit JRE running on a 64-bit IBM RS/6000 processor

    JCo 3.0.3
      • sapjco3-rs6000_64-3.0.3.tgz for a 64-bit JRE running on a 64-bit IBM RS/6000 processor
    "

    HP-UX: SHLIB_PATH, CLASSPATH

    "

    JCo 2.1.8

      • sapjco-hp_32-2.1.8.tgz for a 32-bit JRE running on a 32- or 64-bit PA-RISC processor
      • sapjco-hp_64-2.1.8.tgz for a 64-bit JRE running on a 64-bit PA-RISC processor
      • sapjco-hpia64-2.1.8.tgz for a 64-bit JRE running on 64-bit INTEL Itanium processor

    JCo 3.0.3
      • sapjco3-hp_64-3.0.3.tgz for a 64-bit JRE running on a 64-bit PA-RISC processor
      • sapjco3-hpia64-3.0.3.tgz for a 64-bit JRE running on 64-bit INTEL Itanium processor
    "

    IBM OS/400: LIBPATH, CLASSPATH, QIBM_JAVA_PASE_STARTUP

    "

    JCo 2.1.8

      • sapjco-as400_pase_64-2.1.8.zip for 64-bit JRE.
    JCo 3.0.3
      • sapjco3-as400_pase_64-3.0.3.tar for a 64-bit JRE running on a 64-bit IBM i system
    "

    IBM z/OS: LIBPATH, CLASSPATH

    "

    JCo 2.1.8

      • sapjco-os390-2.1.8.tgz for 32-bit JRE.

    JCo 3.0.3
      • sapjco3-linuxs390x-3.0.3.tgz for a 64-bit JRE running on a 64-bit IBM eServer zSeries processor
    "

For further details, please check the installation.html file provided with the JCo package.

2. Ensure that all paths were JCo is being accessed, have same user rights, especially when using UNIX.

UNIX Command from your SAP JCo installation: ls-lR

Examples:


-rwxr-xr-x 1 root root 5752553 Jun 15 2006 librfccm.o
-rwxr-xr-x 1 root root 3918345 Jun 15 2006 libsapjcorfc.so
-rw-r--r-- 1 root root 304078 Jun 15 2006 sapjco.jar

3. On Windows, you might need additional libraries. Please see the following technote for more information.



Microsoft .dlls for JCo 2.1.4 and above
http://www.ibm.com/support/docview.wss?uid=swg21220665

Problem Determination with SAP JCo 2.1.x and SAP JCo 3.0.x


    ENOEXEC on shared libaries:

    This problem is common on AIX systems when using WebSphere Business Integration Adapter for mySAP.com together with WebSphere Process Server 6.1 or WebSphere Message Broker 6.1.

    Error Message:


    [System: Server] [Thread: wbia_main (#458376136)] [Mesg:
    java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not
    load middleware layer
    'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library
    sapjcorfc [/opt/ibm/wbia/AdapterJRE/jre/bin/libsapjcorfc.so: load
    ENOEXEC on shared library(s)

    Cause:

    The ENOEXEC error indicates that the wrong version of SAP JCo was being installed, which is either the incorrect mode 64 bit instead of 32 bit, or the wrong version.

    Solution:


    Please check the installation guide of SAP JCo to ensure you installed the correct version.
    The following rule applies:
    When using the Adapter Framework 2.6.0.12 on a 64 bit system, please verify that the JDK 1.4.2 is on 32 bit (with the JAVA™ command "java -version").
    One has to use the same JRE when using JCo. In that case, it is necessary to use 32 bit JCo.

    UnsatisfiedLinkError / Load ENOENT

    Error Message:


    java.lang.UnsatisfiedLinkError: /usr/mqm/java/lib/libmqjbnd05.so: load ENOENT on shared library(s) /usr/mqm/java/lib/libmqjbnd05.so libc

    Cause:

    The UnsatisfindLinkError indicates that some of the dependencies from the library are missing /could not be accessed.

    Solution:


    Try to resolve the dependencies by checking them with the "ldd" command on UNIX. In case the error message emerged when using MQ 6.0
    together with the WebSphere Business Integration Framework, the adapter framework is missing MQ 32-bit libraries. Please check the following technote for further information.

    UnsatisfiedLinkError when running WebSphere Business Integration Adapter Framework on AIX 64-bit together with WebSphere MQ 6.0
    http://www.ibm.com/support/docview.wss?uid=swg21409837

    JCo Load Error: "No sapjco rfc in java.library.path"

    Error Message:


    Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc
    [no sapjco rfc in java.library.path]. java.library.path

    Cause:
    Although the SAP JCo libraries were added to the JAVA library path,
    they could not be found. This can be caused by an incompatible JDK
    installed. Problem emerged on HP-UX B.11.31 with WBI mySAP 6.0.9 adapter
    and Adapter Framework 2.6.0.12.


    Solution:
    Verify that a correct IBM JDK is being used by the adapters.
    Check the JAVA version with the command "java -version".

    When using WBI mySAP 6.0.9, check that the Adapter JRE is being used when
    executing the adapter scripts. The Adapter Framework provides JDK 1.4.2 as
    Adapter JRE.

    If you need another IBM JDK, please contact IBM Support.
    Download IBM JRE 5 from the following URL:
    http://www.ibm.com/support/docview.wss?uid=swg21265380


    JCo "connection to partner '9.1.0.20: sapgw00' broken "

    Error Message: The exception emerged when using WebSphere Adapter for SAP Software 7.0 with SAP JCo 3.0.5.
      Caused by: RfcException: [null]
      message: Connect to SAP gateway failed
      Connection parameters: TYPE=A DEST=MYHOST ASHOST=9.1.0.20
      SYSNR=00 GWHOST=9.1.0.20 GWSERV=sapgw00 PCS=1 COMM_CP=1100

      LOCATION CPIC (TCP/IP) on local host with Unicode
      ERROR connection to partner '9.1.0.20:sapgw00' broken
      RELEASE 720
      COMPONENT NI (network interface)
      VERSION 40
      RC -6
      MODULE gwxx_mt.c
      LINE 646
      DETAIL NiIRead: P=9.1.0.20:3602
      SYSTEM CALL GwRead
      COUNTER 6

      Return code: RFC_FAILURE(1)
      error group: 102
      key: RFC_ERROR_COMMUNICATION
    Cause:
    There are various causes for the problem but the configured port and gateway is
    the most likely root cause.

    Solution:
    Verify the port number and sapgw configuration in your "etc/services" file. Make sure there are no
    port conflicts. In above example, an incorrect port was provied to the adapter: 3602.

    Further information on "sapgw" errors can be found here:
    Service "sapgw00" unknown' error in JCo trace of WebSphere Adapter for SAP Software
    http://www.ibm.com/support/docview.wss?uid=swg21413812

Further References

IBM Support Portal


http://www-947.ibm.com/support/entry/portal/Overview/Software/WebSphere/WebSphere_brand_support_(general)


WebSphere Adapter for SAP V7.0: Limitations when using SAP Java Connector 3.0.2
http://www.ibm.com/support/docview.wss?uid=swg21406907

java.lang.ExceptionInInitializerError exception occurs while starting WebSphere Adapter for SAP on i5/OS
http://www.ibm.com/support/docview.wss?uid=swg21322455

Troubleshooting the Adapter for mySAP.com


http://www.ibm.com/support/docview.wss?uid=swg21208860

Unable to set the RFCTracePath parameter to the UNIX location with WebSphere Adapter for SAP with WebSphere Message Broker V6.1
http://www.ibm.com/support/docview.wss?uid=swg21383610

SAPJCO tracing files created in multiple locations for IBM WebSphere Adapter for SAP Software
http://www.ibm.com/support/docview.wss?uid=swg21330607

How to activate JCo tracing for SAP JCo via JVM parameter on WebSphere Process Server V6.0/6.1/6.2
http://www.ibm.com/support/docview.wss?uid=swg21404884


SAP Developer Network
http://www.sdn.sap.com/irj/sdn

SAP Help Portal


http://help.sap.com/

SAP Service Marketplace - SAP Notes Search (login required)
https://websmp106.sap-ag.de/notes

[{"Product":{"code":"SSMKUK","label":"WebSphere Adapters Family"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Adapter for SAP","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"7.5;7.0;6.2;6.1;6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
15 June 2018

UID

swg21418488