{"record":{"id":"799159fa16905e6b","repo":"pentaho/pentaho-kettle","slug":"error-while-executing-sqlldr-orabulkloader","errorCode":null,"errorMessage":"Error while executing sqlldr","messagePattern":"Error while executing sqlldr","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java","lineNumber":537,"sourceCode":"          if ( OraBulkLoaderMeta.METHOD_AUTO_END.equals( loadMethod ) ) {\n            // if this is the first line, we do not need to execute loader\n            // control file may not exists\n            if ( !first ) {\n              execute( meta, true );\n              sqlldrProcess = null;\n            }\n          } else if ( OraBulkLoaderMeta.METHOD_AUTO_CONCURRENT.equals( meta.getLoadMethod() ) ) {\n            try {\n              if ( sqlldrProcess != null ) {\n                int exitVal = sqlldrProcess.waitFor();\n                sqlldrProcess = null;\n                logBasic( BaseMessages.getString( PKG, \"OraBulkLoader.Log.ExitValueSqlldr\", \"\" + exitVal ) );\n                checkExitVal( exitVal );\n              } else if ( !first ) {\n                throw new KettleException( \"Internal error: no sqlldr process running\" );\n              }\n            } catch ( Exception ex ) {\n              throw new KettleException( \"Error while executing sqlldr\", ex );\n            }\n          }\n        }\n        return false;\n      }\n\n      if ( !preview ) {\n        if ( first ) {\n          first = false;\n\n          String recTerm = Const.CR;\n          if ( !Utils.isEmpty( meta.getAltRecordTerm() ) ) {\n            recTerm = substituteRecordTerminator( meta.getAltRecordTerm() );\n          }\n\n          createControlFile( environmentSubstitute( meta.getControlFile() ), r, meta );\n          output = new OraBulkDataOutput( meta, recTerm );\n","sourceCodeStart":519,"sourceCodeEnd":555,"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#L519-L555","documentation":"Any Exception raised inside the stream-load finalize block (waitFor, checkExitVal, closing of the process interaction) is rethrown by processRow as 'Error while executing sqlldr' with the original exception attached as cause. It is a generic wrapper; the cause carries the real problem (non-zero sqlldr exit, interruption, I/O failure).","triggerScenarios":"During the 'wait for database stream' finalize: sqlldrProcess.waitFor() interrupted, or checkExitVal(exitVal) throws for a non-success exit code; the catch wraps them into this KettleException.","commonSituations":"sqlldr exiting with error/warning codes due to bad data or credentials; thread interruption on transformation stop; underlying IOException while the process terminates.","solutions":["Read the cause chain in the Pentaho log — it points at the actual sqlldr failure (exit code, interrupted thread)","Check the sqlldr .log/.bad files for rejected rows and fix data or schema accordingly","Validate connection settings (user/password/SID) — failed logins surface here as non-zero exit codes","If the transformation was intentionally stopped, treat this as a consequence of interruption rather than a bug"],"exampleFix":"// before\nthrow new KettleException( \"Error while executing sqlldr\", ex );\n// after\n// after fixing the cause, e.g. valid credentials:\n// meta.getDatabaseMeta().setUsername( \"correct_user\" );","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  step.processRow( smi, sdi );\n} catch ( KettleException e ) {\n  Throwable cause = e.getCause();\n  if ( cause instanceof InterruptedException ) {\n    // transformation was stopped\n  } else if ( cause instanceof KettleException ) {\n    // sqlldr exit code problem — inspect sqlldr log\n  }\n}","preventionTips":["Always read the cause chain — the wrapper hides the real failure","Validate data and credentials before bulk loading","Monitor the sqlldr .log/.bad files for every run"],"tags":["oracle","sqlldr","process-execution"],"backgroundTag":"http-error-response","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"}