IBM Support

java.lang.ExceptionInInitializerError exception occurs while starting WebSphere Adapter for SAP on i5/OS

Troubleshooting


Problem

When you start WebSphere Adapter for SAP on an i5/OS V5R4 system, a runtime exception is thrown. This occurs even though you have added the sapjco.jar file into the /lib/ext directory and the *.o and *.so files into the /SAPJCO directory and set the LIBPATH environment variable to point to the directory.

Symptom

The stacktrace in the trace file will look like the following example:

com.ibm.ws.exception.RuntimeWarning:
com.ibm.ws.exception.RuntimeWarning:
javax.resource.ResourceException:
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 [no sapjcorfc in java.library.path]. java.library.path.

Resolving The Problem

To resolve the problem:

  1. Add the following files to the /SAPJCO directory:
    • sapjco.jar
    • librfccm.o
    • llibsapjcorfc.so
  2. Add a LIBPATH variable for the SAPJCO folder
  3. Add a CLASSPATH variable that points to the /SAPJCO/sapjco.jar directory.
  4. Add a system-wide variable QIBM_JAVA_PASE_STARTUP that points to the /usr/lib/start64 directory.
  5. Restart WebSphere Application Server and deploy the application again.

[{"Product":{"code":"SSMKUK","label":"WebSphere Adapters Family"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Adapter for SAP","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.2","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
15 June 2018

UID

swg21322455