pentaho/pentaho-kettle · error · KettleException
KettleException(e)
Error message
KettleException(e)
What it means
KettleException wrapping any Exception thrown in the JsonInputMeta file-listing logic (getFiles path) that builds the file/required arrays from resolved filenames. It means the step could not compute its input file list — typically a failure while expanding wildcards or resolving filenames via the variable space.
Solutions
- Check the wrapped cause in the log; usually a bad directory or filename pattern in the step's File tab.
- Test that the wildcard base directory exists and is readable by the Pentaho user (ls the path).
- Replace or define any ${VARIABLE} used in file/folder names and re-run.
- Simplify the wildcard (test in a shell with the same glob) to confirm which pattern fails.
Example fix
// before: File/Directory tab
${DATA_DIR}/logs/*.json // DATA_DIR undefined
// after: define the variable, or use an absolute path
-D DATA_DIR=/opt/etd/data or /opt/etd/data/logs/*.json Defensive patterns
Strategy: validation
Validate before calling
// verify the wildcard base directory resolves before running
String dir = space.environmentSubstitute("${DATA_DIR}/logs");
if (!Files.isDirectory(Paths.get(dir))) throw new IllegalStateException("Base dir missing: " + dir); Prevention
- Define all ${VARIABLES} used in file/folder settings (kettle.properties or runtime args).
- Test wildcard patterns in a shell on the same host Pentaho runs on.
- Ensure the Pentaho service account can read the target directories.
- For remote schemes, verify the VFS provider works with a simple file listing first.
When it happens
Trigger: During file-list computation (FileInputList creation / setFileRequired / Arrays.fill block): exception while resolving wildcard directories, expanding ${variables} in file paths, or accessing the directory to enumerate matching files.
Common situations: Wildcard pattern pointing at a nonexistent or unreadable directory; invalid glob characters; unresolved environment variables in file/folder names; VFS provider errors for remote schemes (SFTP, S3).
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
- ChangeFileEncoding.Exception.TargetEncodingEmpty
- PurRepository.ERROR_0008_TRANSFORMATION_PATH_INVALID
- Trans.Log.StepCopiesNotCorrectlyDefined
- Unable to get all files of type
- Variable name nor value was specified on line #
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5ed52173b03a0fc0.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/json/core/src/main/java/org/pentaho/di/trans/steps/jsoninput/JsonInputMeta.java:1138
//
if ( fileObject.exists() ) {
// Convert to an absolute path and add it to the list.
//
newFilenames.add( fileObject.getName().getPath() );
}
}
// Still here: set a new list of absolute filenames!
//
setFileName( newFilenames.toArray( new String[newFilenames.size()] ) );
setFileMask( new String[newFilenames.size()] ); // all null since converted to absolute path.
setFileRequired( new String[newFilenames.size()] ); // all null, turn to "Y" :
Arrays.fill( getFileRequired(), YES );
}
}
return null;
} catch ( Exception e ) {
throw new KettleException( e );
}
}
@Override
public String getEncoding() {
return "UTF-8";
}
@Override
public StepHelperInterface getStepHelperInterface() {
return new JsonInputHelper();
}
// Needed for PDI-19138 purposes
public static boolean getIncludeNullsProperty() {
return "Y".equalsIgnoreCase( System.getProperty( Const.KETTLE_JSON_INPUT_INCLUDE_NULLS, "N" ) );
}
}View on GitHub (pinned to f3058517a1)