SAP Error: "NoClassDefFoundError or Could not initialize class"

SAP Error: "NoClassDefFoundError or Could not initialize class"

book

Article ID: KB0082817

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All Versions

Description

Why SAP returns a class error to TIBCO Data Virtualization (TDV)?
Could not initialize class com.compositesw.cdms.ds.sap.table.SAPTableResult
 
OR 
 
java.lang.NoClassDefFoundError: com/sap/conn/jco/util/SyncDateFormat

 

Issue/Introduction

This document describes a SAP error.

Resolution

For the missing JCoException class, use the JDK’s “jar” utility to check whether your sapjco3.jar contains the class, like:

jar -tvf sapjco3.jar | findstr JCoException (Windows)
jar -tvf sapjco3.jar | findstr JCoException (Linux)

If you don’t see the class, it means you do not have a valid sapjco3.jar file.

If you do see the class, then, check whether the JAR is copied to the locations that TDV looks in order to find the JAR.

You need to copy the files to these locations:

CIS_INSTALL_DIR\apps\server\lib\sapjco3.jar
CIS_INSTALL_DIR \apps\server\lib\sapjcorfc.dll
CIS_INSTALL_DIR \jre\lib\ext\sapjco3.jar


Also, use the command line test GUI in order to verify that JCo works

java -classpath . -Djava.library.path=C:\bin\downloads\sap -jar sapjco.jar

The JCo GUI must pop up. If JCo works, there will be no error messages in the GUI.