SAP JCO Class not initialize error

0
Hi  All,   I am integrate SAP using BAPI. we are able to get the data when we are triggering it locally using the SAP JCO3.1 file for windows but after deployment with the SAP JCO 3.1 Linux file I am getting error mentioned below   Exception in thread "JCoPoolFinalizerThread" java.lang.NoClassDefFoundError: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory at com.sap.conn.jco.rt.ConnectionManager.clearAllFactories(ConnectionManager.java:106) at com.sap.conn.jco.rt.ConnectionManager$PoolFinalizer.run(ConnectionManager.java:56) at java.base/java.lang.Thread.run(Unknown Source) DEFAULT 2022-12-21T13:28:52Z NoClassDefFoundError occurred for class 'Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory'. Please make sure the userlib folder of your project includes the correct library which contains this class. CRITICAL - ActionManager: java.lang.NoClassDefFoundError: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Unknown Source) at com.sap.conn.jco.JCo.createJCo(JCo.java:44) at com.sap.conn.jco.JCo.<clinit>(JCo.java:35) at com.sap.conn.jco.JCoDestinationManager.getDestination(JCoDestinationManager.java:56) at sapbapiconnector.actions.CallBAPI.executeAction(CallBAPI.java:79) at sapbapiconnector.actions.CallBAPI.executeAction(CallBAPI.java:30) at  
asked
1 answers
0

Hi Gunwoo and Pranjal,

 

https://support.sap.com/en/product/connectors/jco.html

It works locally because it is installed on your laptop and included in the environment variable PATH.

 

Include the suitable Java library available in the userlib directory of your project.

 

Go Make It

answered