Runtime error "java.lang.NoClassDefFoundError: com/sap/conn/jco/ext/ServerDataProvider" and "java.lang.NoClassDefFoundError: com/sap/conn/jco/server/JCoServerTIDHandler" encountered while working with SAP

Runtime error "java.lang.NoClassDefFoundError: com/sap/conn/jco/ext/ServerDataProvider" and "java.lang.NoClassDefFoundError: com/sap/conn/jco/server/JCoServerTIDHandler" encountered while working with SAP

book

Article ID: KB0083572

calendar_today

Updated On:

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

Description

Issue: While working with SAP plugin application, the following error is thrown at runtime and the application fails to start.
-------
ERROR [<App_Name>.SAPConnectionResource] c.t.b.s.r.c.SharedResourceModulePropertyTracker - TIBCO-BW-SR-FRWK-502000: Failed to start SharedResource [<App_Name>.SAPConnectionResource] for Module [<App_Name>:<Version>], DeploymentUnit [<App_Name>.application:<version>].
    java.lang.NoClassDefFoundError: com/sap/conn/jco/ext/ServerDataProvider.
    java.lang.ClassNotFoundException: com.sap.conn.jco.ext.ServerDataProvider cannot be found by com.tibco.bw.sharedresource.sapconnection.runtime_<Plugin_Version>

ERROR [<App_Name>.SAPTIDManagerResource] c.t.b.s.r.c.SharedResourceModulePropertyTracker - TIBCO-BW-SR-FRWK-502000: Failed to start SharedResource [<App_Name>.SAPTIDManagerResource] for Module [SAP_Test:1.0.0.20170915133659], DeploymentUnit [<App_Name>.application:1.0].
    java.lang.NoClassDefFoundError: com/sap/conn/jco/server/JCoServerTIDHandler.
    java.lang.ClassNotFoundException: com.sap.conn.jco.server.JCoServerTIDHandler cannot be found by com.tibco.bw.sharedresource.saptidmanager.runtime_<Plugin_Version>
-----


Cause: The above error indicates that the SAP Plugin application was unable to load the JCo classes from the classpath at runtime which is needed by the SAP Connection Resource and SAP TID Manager Resource. This JCo classes are loaded through the JCo JAR files which is provided during the installation of the plugin. Sometimes due to a bad installation, the required JCo files are not copied to their respective location resulting in the above error during runtime.

Environment

All

Resolution

In order to resolve the issue, reinstall the SAP Plugin and provide the appropriate JCo JAR files during the installation. Once the installation is completed, verify the following path to ensure that the JCo JAR files are copied correctly.

<TIBCO_HOME>\bw\palettes\sap\<Plugin_version>\runtime\plugins\com.tibco.tpshell.sap.jco_3.0.8.002

NOTE: In case you find that the JCo JAR files are not present, then do not copy the JCo JAR files directly to the above location. Copying the JCo JAR files directly may cause issues later on. Therefore, the recommended way in this case is to reinstall the SAP plugin.

Issue/Introduction

Runtime error "java.lang.NoClassDefFoundError: com/sap/conn/jco/ext/ServerDataProvider" and "java.lang.NoClassDefFoundError: com/sap/conn/jco/server/JCoServerTIDHandler" encountered while working with SAP.