{"record":{"id":"97e98e292ea35e57","repo":"pentaho/pentaho-kettle","slug":"error-while-executing-sqlldr","errorCode":null,"errorMessage":"Error while executing sqlldr ''","messagePattern":"Error while executing sqlldr ''","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"critical","filePath":"plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java","lineNumber":489,"sourceCode":"      StreamLogger errorLogger = new StreamLogger( sqlldrProcess.getErrorStream(), \"ERROR\" );\n\n      // any output?\n      StreamLogger outputLogger = new StreamLogger( sqlldrProcess.getInputStream(), \"OUTPUT\" );\n\n      // kick them off\n      errorLogger.start();\n      outputLogger.start();\n\n      if ( wait ) {\n        // any error???\n        int exitVal = sqlldrProcess.waitFor();\n        sqlldrProcess = null;\n        logBasic( BaseMessages.getString( PKG, \"OraBulkLoader.Log.ExitValueSqlldr\", \"\" + exitVal ) );\n        checkExitVal( exitVal );\n      }\n    } catch ( Exception ex ) {\n      // Don't throw the message upwards, the message contains the password.\n      throw new KettleException( \"Error while executing sqlldr \\'\" + createCommandLine( meta, false ) + \"\\'\" );\n    }\n\n    return true;\n  }\n\n  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {\n    meta = (OraBulkLoaderMeta) smi;\n    data = (OraBulkLoaderData) sdi;\n\n    try {\n      Object[] r = getRow(); // Get row from input rowset & set row busy!\n      if ( r == null ) {\n        // no more input to be expected...\n\n        setOutputDone();\n\n        if ( !preview ) {\n          if ( output != null ) {","sourceCodeStart":471,"sourceCodeEnd":507,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java#L471-L507","documentation":"execute() wraps the whole sqlldr launch/wait in a catch that rethrows as 'Error while executing sqlldr' with the command line generated with includePassword=false. Any exception starting or waiting for the process (IOException, security manager denial, interrupted wait) lands here. The original message is deliberately swallowed because it can contain the database password.","triggerScenarios":"Runtime.exec fails to spawn sqlldr (binary not found → IOException); the command line contains characters that break exec tokenization; waitFor() throws InterruptedException; checkExitVal itself throws inside the try.","commonSituations":"sqlldr not installed / not on PATH; ORACLE_HOME or PATH not set for the Pentaho user; custom sqlldr path with spaces not quoted; password with special characters breaking the command line.","solutions":["Install the Oracle client (sqlldr) and ensure it is on PATH for the user running the transformation","Check the child stack trace (logged, not in the exception) to identify whether exec failed or wait failed","Set the sqlldr binary path explicitly in the step settings if it is in a non-standard location","Quote/escape the custom sqlldr path when it contains spaces; avoid special characters in credentials or store them properly in the connection metadata"],"exampleFix":"// before\n// sqlldr path not configured, relies on PATH\nmeta.setSqlldr( \"\" );\n// after\n// point to the client-provided binary explicitly\nmeta.setSqlldr( \"/opt/oracle/instantclient_19_8/sqlldr\" );","handlingStrategy":"validation","validationCode":"// check sqlldr availability before invoking the step\nProcess p = new ProcessBuilder( \"sqlldr\", \"-help\" ).redirectErrorStream( true );\np.start().waitFor(); // IOException here means sqlldr is not runnable","typeGuard":null,"tryCatchPattern":"try {\n  step.processRow( smi, sdi );\n} catch ( KettleException e ) {\n  if ( e.getMessage().startsWith( \"Error while executing sqlldr\" ) ) {\n    // cause is hidden (contains password) — check step log for the original stack trace\n  }\n}","preventionTips":["Install the Oracle client with sqlldr and set PATH/ORACLE_HOME","Avoid spaces/special characters in the sqlldr binary path; quote if needed","Check the Pentaho log for the swallowed child exception stack trace"],"tags":["oracle","sqlldr","process-execution","ioexception"],"backgroundTag":"command-not-found","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"}