pentaho/pentaho-kettle · error · KettleException
Error retrieving logfile string
Error message
Error retrieving logfile string
What it means
When a log file is configured, createCommandLine resolves its path via VFS and appends log='<path>'. If getFileObject/getFilename throws KettleFileException, it is wrapped and rethrown as this KettleException while building the sqlldr command.
Solutions
- Fix the log file path in the step dialog; create the parent directory first.
- Define any environment variables used in the path.
- Choose a location writable by the user running the transformation.
- Clear the log file field if a log is not needed (the error only occurs when a value is set).
Example fix
// before (missing directory) log = /logs/oracle/load.log // after (directory exists) log = /tmp/orabulk/load.log
Defensive patterns
Strategy: validation
Validate before calling
// Java: pre-check optional log file path
String log = meta.getLogFile();
if (log != null) {
String resolved = transMeta.environmentSubstitute(log);
File dir = new File(resolved).getAbsoluteFile().getParentFile();
if (!dir.isDirectory()) {
throw new IllegalStateException("Log directory does not exist: " + dir);
}
} Try / catch
try {
trans.execute(null);
} catch (KettleException e) {
if (String.valueOf(e.getMessage()).contains("Error retrieving logfile")) {
// inspect cause; fix path or clear the field if logging not needed
}
} Prevention
- Create log directories as part of deployment.
- Keep optional file fields empty rather than filled with placeholder paths.
- Use absolute paths on the execution host.
When it happens
Trigger: meta.getLogFile() is non-null but VFS resolution fails (unresolvable variable, invalid path/scheme, inaccessible target) during createCommandLine from execute.
Common situations: Log path uses an undefined environment variable; log directory does not exist; typo in path scheme; permissions prevent resolving/creating the file.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Error retrieving badfile string
- Error retrieving controlfile string
- Error retrieving discardfile string
- Error retrieving sqlldr string
- Could not find field in stream
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/969871b1f1e551a1.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoader.java:389
}
} else {
throw new KettleException( "No control file specified" );
}
if ( OraBulkLoaderMeta.METHOD_AUTO_CONCURRENT.equals( meta.getLoadMethod() ) ) {
sb.append( " data=\'-\'" );
}
if ( meta.getLogFile() != null ) {
try {
FileObject fileObject =
getFileObject( meta.getLogFile(), getTransMeta() );
sb.append( " log=\'" );
sb.append( getFilename( fileObject ) );
sb.append( "\'" );
} catch ( KettleFileException ex ) {
throw new KettleException( "Error retrieving logfile string", ex );
}
}
if ( meta.getBadFile() != null ) {
try {
FileObject fileObject =
getFileObject( meta.getBadFile(), getTransMeta() );
sb.append( " bad=\'" );
sb.append( getFilename( fileObject ) );
sb.append( "\'" );
} catch ( KettleFileException ex ) {
throw new KettleException( "Error retrieving badfile string", ex );
}
}
if ( meta.getDiscardFile() != null ) {
try {View on GitHub (pinned to f3058517a1)