How to resolve "java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path" exception

How to resolve "java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path" exception

book

Article ID: KB0082313

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for SAP Solutions 7.x

Description

While starting the SAP adapter on administrator got the below exception: 
-----------
Exception in thread "main" java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path 
at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:227) 
at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:99) 
at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23) 
at java.lang.Class.forName0(Native Method) 
at java.lang.Class.forName(Class.java:264) 
at com.sap.conn.jco.JCo.createJCo(JCo.java:52) 
at com.sap.conn.jco.JCo.<clinit>(JCo.java:26) 
at com.tibco.sap.metadata.SAPRepository.initializeRepoFromAESchema(Unknown Source) 
at com.tibco.sap.metadata.SAPRepository.initialize(Unknown Source) 
at com.tibco.sap.adapter.SAPApplication.initializeRepository(Unknown Source) 
at com.tibco.sap.adapter.SAPApplication.onInitialization(Unknown Source) 
at com.tibco.sdk.MAppImpl.initialize(MAppImpl.java:563) 
at com.tibco.sdk.MDefaultAppImpl.start(MDefaultAppImpl.java:144) 
at com.tibco.sdk.MApp.start(MApp.java:225) 
at com.tibco.sap.adapter.SAPAdapter.main(Unknown Source) 
------------

Issue/Introduction

To resolve this issue, check the SAP JCo library folder path is correctly populated in the application .tra and adr3.tra file. 

Environment

------------------------------------------------------------------ Product: TIBCO ActiveMatrix® Adapter for SAP Version: 7.x OS: All Supported Operating Systems only -------------------------------------------------------------------

Resolution

The error message "Java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path" indicates SAPJCo library is not properly configured. In order to troubleshoot and resolve this issue perform the below mentioned steps.

1) Check TRA bit-size, SAP JCo library version and it's bit-size, And ensure that SAP JCo library should be exactly matching TRA's bit-size and OS.

2) Also, check the SAP JCo library path is correctly populated in the application .tra, adr3.tra file and make sure that SAP JCo path listed in the following properties:
-----------
tibco.env.CUSTOM_CP_EXT <path of SAP Jco library>
tibco.env.CUSTOM_PATH <path of SAP Jco library> 
-----------