pentaho/pentaho-kettle · critical · KettleException

Error while executing sqlldr ''

Error message

Error while executing sqlldr ''

What it means

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.

Solutions

  1. Install the Oracle client (sqlldr) and ensure it is on PATH for the user running the transformation
  2. Check the child stack trace (logged, not in the exception) to identify whether exec failed or wait failed
  3. Set the sqlldr binary path explicitly in the step settings if it is in a non-standard location
  4. Quote/escape the custom sqlldr path when it contains spaces; avoid special characters in credentials or store them properly in the connection metadata

Example fix

// before
// sqlldr path not configured, relies on PATH
meta.setSqlldr( "" );
// after
// point to the client-provided binary explicitly
meta.setSqlldr( "/opt/oracle/instantclient_19_8/sqlldr" );
Defensive patterns

Strategy: validation

Validate before calling

// check sqlldr availability before invoking the step
Process p = new ProcessBuilder( "sqlldr", "-help" ).redirectErrorStream( true );
p.start().waitFor(); // IOException here means sqlldr is not runnable

Try / catch

try {
  step.processRow( smi, sdi );
} catch ( KettleException e ) {
  if ( e.getMessage().startsWith( "Error while executing sqlldr" ) ) {
    // cause is hidden (contains password) — check step log for the original stack trace
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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

Appendix: source

Thrown at plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java:489

      StreamLogger errorLogger = new StreamLogger( sqlldrProcess.getErrorStream(), "ERROR" );

      // any output?
      StreamLogger outputLogger = new StreamLogger( sqlldrProcess.getInputStream(), "OUTPUT" );

      // kick them off
      errorLogger.start();
      outputLogger.start();

      if ( wait ) {
        // any error???
        int exitVal = sqlldrProcess.waitFor();
        sqlldrProcess = null;
        logBasic( BaseMessages.getString( PKG, "OraBulkLoader.Log.ExitValueSqlldr", "" + exitVal ) );
        checkExitVal( exitVal );
      }
    } catch ( Exception ex ) {
      // Don't throw the message upwards, the message contains the password.
      throw new KettleException( "Error while executing sqlldr \'" + createCommandLine( meta, false ) + "\'" );
    }

    return true;
  }

  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
    meta = (OraBulkLoaderMeta) smi;
    data = (OraBulkLoaderData) sdi;

    try {
      Object[] r = getRow(); // Get row from input rowset & set row busy!
      if ( r == null ) {
        // no more input to be expected...

        setOutputDone();

        if ( !preview ) {
          if ( output != null ) {

View on GitHub (pinned to f3058517a1)