pentaho/pentaho-kettle · error · SAPException

SapInputDialog.JCoImplNotFound

Error message

SapInputDialog.JCoImplNotFound

What it means

SAPException thrown by SAPConnectionFactory.create() when the JCo API jar exists but its native implementation is unavailable (SAPLibraryTester.isJCoImplAvailable() fails). JCo requires platform-specific native binaries alongside the Java classes.

Solutions

  1. Install the JCo native library matching your OS and JVM bitness next to sapjco3.jar.
  2. Set LD_LIBRARY_PATH (Linux) or PATH (Windows) to include the directory containing the native lib, or use -Djava.library.path.
  3. Verify bitness: file libsapjco3.so must match java -version architecture.
  4. On Linux, run ldd libsapjco3.so to find missing shared object dependencies.
  5. Restart PDI after installing the library so the classloader picks it up.

Example fix

// before
$ java -jar ... # jar present, no native lib
UnsatisfiedLinkError / JCoImplNotFound
// after
export LD_LIBRARY_PATH=/opt/sapjco:$LD_LIBRARY_PATH
# /opt/sapjco/libsapjco3.so must match the JVM bitness
Defensive patterns

Strategy: validation

Validate before calling

// verify native lib loads before creating a connection
try { System.loadLibrary("sapjco3"); } catch ( UnsatisfiedLinkError e ) { throw new SAPException("JCo native library not loadable: " + e.getMessage()); }

Type guard

boolean jCoImplAvailable() {
  try { System.loadLibrary("sapjco3"); return true; }
  catch ( UnsatisfiedLinkError e ) { return false; }
}

Try / catch

try { SAPConnection c = SAPConnectionFactory.create(); } catch ( SAPException e ) { // check LD_LIBRARY_PATH / java.library.path and JVM bitness }

Prevention

When it happens

Trigger: sapjco3.jar present but libsapjco3.so/sapjco3.dll missing or not loadable — wrong OS build, missing from java.library.path, or JVM bitness mismatch (64-bit JVM with 32-bit native lib).

Common situations: Copying only the jar to a new server; upgrading from 32-bit to 64-bit JVM without replacing the native lib; missing OS dependencies for the .so; LD_LIBRARY_PATH not set on Linux.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/fb67ed4590b787cf. Report an issue: GitHub.

Appendix: source

Thrown at plugins/sap/core/src/main/java/org/pentaho/di/trans/steps/sapinput/sap/SAPConnectionFactory.java:35

import org.pentaho.di.core.Const;
import org.pentaho.di.core.database.DatabaseFactoryInterface;
import org.pentaho.di.core.database.DatabaseMeta;
import org.pentaho.di.core.database.DatabaseTestResults;
import org.pentaho.di.core.exception.KettleDatabaseException;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.trans.steps.sapinput.SapInputMeta;
import org.pentaho.di.trans.steps.sapinput.sap.impl.SAPConnectionImpl;

public class SAPConnectionFactory implements DatabaseFactoryInterface {

  public static SAPConnection create() throws SAPException {
    if ( !SAPLibraryTester.isJCoLibAvailable() ) {
      String message = BaseMessages.getString( SapInputMeta.class, "SapInputDialog.JCoLibNotFound" );
      throw new SAPException( message );
    }
    if ( !SAPLibraryTester.isJCoImplAvailable() ) {
      String message = BaseMessages.getString( SapInputMeta.class, "SapInputDialog.JCoImplNotFound" );
      throw new SAPException( message );
    }
    return new SAPConnectionImpl();
  }

  /**
   * The SAP connection to test
   */
  public String getConnectionTestReport( DatabaseMeta databaseMeta ) throws KettleDatabaseException {

    StringBuilder report = new StringBuilder();

    SAPConnection sc = null;

    try {

      sc = create();

      sc.open( databaseMeta );

View on GitHub (pinned to f3058517a1)