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
- 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
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
- 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
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
- Error while closing output
- Error while executing sqlldr
- Error retrieving sqlldr string
- Internal error: no sqlldr process running
- IO exception occured:
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)