pentaho/pentaho-kettle · error · RuntimeException
file [ + ArgList[0] + ] can not be found!
Error message
file [ + ArgList[0] + ] can not be found!
What it means
Misreported-looking guard from the isFile/file-exists family in the script step: the file named by ArgList[0] could not be resolved through KettleVFS (does not exist or is unreachable), so the existence check fails and the runtime error reports the missing file path.
Solutions
- Verify the exact path exists before the transformation step (ls / log the resolved path).
- Use absolute paths or set the correct base directory for relative paths.
- Ensure any step that generates the file completes successfully before isFile runs.
- Check VFS scheme/credentials if the file lives on a remote filesystem.
Example fix
// before
var ok = isFile('/staging/dump.csv'); // never created
// after
var ok = isFile('/staging/output/dump.csv'); // correct output dir Defensive patterns
Strategy: validation
Validate before calling
var f = new java.io.File(path);
if (f.exists()) {
var ok = isFile(path);
} else {
// file absent — decide policy here instead of letting isFile throw
} Prevention
- Check existence with java.io.File before calling isFile.
- Use absolute paths; confirm the working directory of the execution engine (Spoon vs Pan).
- Guarantee producing steps finished before existence checks.
When it happens
Trigger: Calling isFile('/missing/path.txt') where KettleVFS resolves the object but file.exists() is false: wrong path, file not yet created, deleted between steps, or wrong working directory for relative paths.
Common situations: Checking for optional input files that were never produced, environment-dependent absolute paths, and relative paths resolved against the Spoon vs. Pan working directory.
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
- [ + ArgList[0] + ] is not a file!
- ChangeFileEncoding.Error.SourceFileNotExists
- Error retrieving command string
- GetXMLDataDialog.Exception.FileDoesNotExist
- ] is not a file!
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/da7103a121ba91bc.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/script/ScriptAddedFunctions.java:2145
try {
if ( ArgList.length == 1 && !isNull( ArgList[0] ) && !isUndefined( ArgList[0] ) ) {
if ( ArgList[0].equals( null ) ) {
return false;
}
FileObject file = null;
try {
// Source file
file = KettleVFS.getInstance( bowl ).getFileObject( (String) ArgList[0] );
boolean isafile = false;
if ( file.exists() ) {
if ( file.getType().equals( FileType.FILE ) ) {
isafile = true;
} else {
throw new RuntimeException( "[" + ArgList[0] + "] is not a file!" );
}
} else {
throw new RuntimeException( "file [" + ArgList[0] + "] can not be found!" );
}
return isafile;
} catch ( IOException e ) {
throw new RuntimeException( "The function call is File throw an error : " + e.toString() );
} finally {
if ( file != null ) {
try {
file.close();
} catch ( Exception e ) {
// Ignore errors
}
}
}
} else {
throw new RuntimeException( "The function call isFile is not valid." );
}
} catch ( Exception e ) {View on GitHub (pinned to f3058517a1)