How to resolve "java.lang.NoClassDefFoundError: com/sap/conn/jco/JCoException" exception thrown while starting the SAP Adapter.

How to resolve "java.lang.NoClassDefFoundError: com/sap/conn/jco/JCoException" exception thrown while starting the SAP Adapter.

book

Article ID: KB0081547

calendar_today

Updated On:

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

Description

Sometime while initializing the SAP Adapter the below mentioned error is thrown.

--Error Stack---

WRAPPER - start method threw an exception
Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/conn/jco/JCoException
at com.tibco.sap.adapter.SAPApplication.initializeRepository(Unknown Source)
....

------------------

The above error indicates that the SAP JCo library(sapjco3.jar) was not found in the classpath by the adapter. The Exception in thread "main" java.lang.NoClassDefFoundError is a common error in Java which occurs if a classloader is not able to find a particular class in the classpath while trying to load it. The Exception in thread "main" suggests that this error has occurred in the main thread, the thread which is responsible for running Java application. This error can occur to any thread but if it happens in main thread then your program will crash. As per Javadoc, NoClassDefFoundError can be thrown during linking or loading of the class file. It's denoted by java.lang.NoClassDefFoundError and comes when that particular class is present during compile time but somehow not available during runtime as what mentioned above. This could be due to missing JAR file, any permission issue, or incorrect classpath on runtime, depending upon your environment.

 

Issue/Introduction

How to resolve "java.lang.NoClassDefFoundError: com/sap/conn/jco/JCoException" exception thrown while starting the SAP Adapter.

Environment

All

Resolution

Please check the adr3.tra(if design time) or Adapter_instance.tra(If deployed) file and make sure that the classpath includes the path of the directory which includes the required SAP JCo Jar files.