{"record":{"id":"ef35c8d299bd67d1","repo":"pentaho/pentaho-kettle","slug":"sapinputdialog-jcolibnotfound","errorCode":null,"errorMessage":"SapInputDialog.JCoLibNotFound","messagePattern":"SapInputDialog\\.JCoLibNotFound","errorType":"exception","errorClass":"SAPException","httpStatus":null,"severity":"error","filePath":"plugins/sap/core/src/main/java/org/pentaho/di/trans/steps/sapinput/sap/SAPConnectionFactory.java","lineNumber":31,"sourceCode":"\n\npackage org.pentaho.di.trans.steps.sapinput.sap;\n\nimport org.pentaho.di.core.Const;\nimport org.pentaho.di.core.database.DatabaseFactoryInterface;\nimport org.pentaho.di.core.database.DatabaseMeta;\nimport org.pentaho.di.core.database.DatabaseTestResults;\nimport org.pentaho.di.core.exception.KettleDatabaseException;\nimport org.pentaho.di.i18n.BaseMessages;\nimport org.pentaho.di.trans.steps.sapinput.SapInputMeta;\nimport org.pentaho.di.trans.steps.sapinput.sap.impl.SAPConnectionImpl;\n\npublic class SAPConnectionFactory implements DatabaseFactoryInterface {\n\n  public static SAPConnection create() throws SAPException {\n    if ( !SAPLibraryTester.isJCoLibAvailable() ) {\n      String message = BaseMessages.getString( SapInputMeta.class, \"SapInputDialog.JCoLibNotFound\" );\n      throw new SAPException( message );\n    }\n    if ( !SAPLibraryTester.isJCoImplAvailable() ) {\n      String message = BaseMessages.getString( SapInputMeta.class, \"SapInputDialog.JCoImplNotFound\" );\n      throw new SAPException( message );\n    }\n    return new SAPConnectionImpl();\n  }\n\n  /**\n   * The SAP connection to test\n   */\n  public String getConnectionTestReport( DatabaseMeta databaseMeta ) throws KettleDatabaseException {\n\n    StringBuilder report = new StringBuilder();\n\n    SAPConnection sc = null;\n\n    try {","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/sap/core/src/main/java/org/pentaho/di/trans/steps/sapinput/sap/SAPConnectionFactory.java#L13-L49","documentation":"SAPException thrown by SAPConnectionFactory.create() when the SAP Java Connector (JCo) native library is not available on the classpath/library path. SAPLibraryTester.isJCoLibAvailable() checks for the JCo jar (sapjco3.jar); without it no SAP connection can be created.","triggerScenarios":"create() is called (e.g. from SapInputDialog 'Test connection') while sapjco3.jar is absent from PDI's lib or plugins/sap directories.","commonSituations":"Fresh PDI install without the SAP JCo driver (not bundled due to SAP licensing); copying plugins/sap between machines without the JCo jar; using an incompatible JCo version for the OS/JVM; 32/64-bit native lib mismatch.","solutions":["Download sapjco3.jar (and the matching native library) from the SAP Service Marketplace for your OS/JVM.","Place sapjco3.jar in the plugins/sap folder (or PDI lib) and restart Spoon.","Ensure the JCo native library (libsapjco3.so / sapjco3.dll) is on java.library.path and matches your JVM bitness.","Verify with java -version vs the downloaded JCo architecture (x86_64 vs aarch64).","Confirm the jar is readable by the user running PDI (permissions)."],"exampleFix":"// environment fix, not code\n# before\n$ ls plugins/sap/*.jar\nlib-kettle-core...  (no sapjco3.jar)\n# after\ncp ~/downloads/sapjco3.jar plugins/sap/\ncp ~/downloads/libsapjco3.so $JAVA_HOME/lib/amd64/  # or set -Djava.library.path","handlingStrategy":"validation","validationCode":"// before invoking SAP steps, check the JCo jar is present\nClass.forName(\"com.sap.conn.jco.JCoDestinationManager\");","typeGuard":"boolean jCoLibAvailable() {\n  try { Class.forName(\"com.sap.conn.jco.JCo\"); return true; }\n  catch ( ClassNotFoundException e ) { return false; }\n}","tryCatchPattern":"try { SAPConnection c = SAPConnectionFactory.create(); } catch ( SAPException e ) { // show dialog telling admin to install sapjco3.jar and restart }","preventionTips":["Include sapjco3.jar in the PDI deployment package for all environments.","Document the SAP-licensed jar installation step in setup runbooks.","After JVM or OS changes, re-verify JCo availability.","Add a startup check/job that fails fast when JCo is missing."],"tags":["kettle","sap","jco","classpath","dependency"],"backgroundTag":"missing-dependency","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}