pentaho/pentaho-kettle · error · KettleException
throw new KettleException( e );
Error message
throw new KettleException( e );
What it means
Wraps any IOException raised while reading extended file attributes (specifically the file's size via data.file.getContent().getSize()) during row processing of the GetFileNames step. The KettleStep rethrows it as a KettleException to abort the row with the original cause attached.
Solutions
- Check the wrapped cause (getCause()) to see the underlying IOException.
- Verify the files still exist and are readable when the step runs.
- For network-backed files, ensure connectivity/credentials and stable mounts.
- Exclude size ('Include file size in output') if size is unavailable for that filesystem.
Defensive patterns
Strategy: try-catch
Validate before calling
if (!fileObject.exists() || !fileObject.isReadable()) { /* skip or fail fast */ } Try / catch
try {
long size = data.file.getContent().getSize();
} catch (IOException e) {
// fallback: omit size or mark null
size = -1;
} Prevention
- Disable 'include file size' for filesystems where stat is unreliable
- Ensure files are stable (not being written/moved) during the run
- Check permissions and mounts before the transformation
When it happens
Trigger: IOException while resolving content size for a file in the file list (file disappeared between listing and read, I/O error, unsupported filesystem operation on VFS).
Common situations: File deleted/moved by another process after listing; network/SFTP/HTTP-backed VFS file became unreachable; permissions prevent stat.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- CsvInput.Exception.CreateFieldMappingError
- e (no own message; error opening CSV file)
- Exception reading line using NIO
- Unable to close file channel for file '" + filenames[filenr…
- A deadlock was detected between steps
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/02e6afd0de8992e0.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/getfilenames/GetFileNames.java:228
// isreadable
extraData[outputIndex++] = Boolean.valueOf( data.file.isReadable() );
// iswriteable
extraData[outputIndex++] = Boolean.valueOf( data.file.isWriteable() );
// lastmodifiedtime
extraData[outputIndex++] = new Date( data.file.getContent().getLastModifiedTime() );
// size
Long size = null;
if ( data.file.getType().equals( FileType.FILE ) ) {
size = new Long( data.file.getContent().getSize() );
}
extraData[outputIndex++] = size;
} catch ( IOException e ) {
throw new KettleException( e );
}
// extension
extraData[outputIndex++] = data.file.getName().getExtension();
// uri
extraData[outputIndex++] = Const.optionallyDecodeUriString( data.file.getName().getURI() );
// rooturi
extraData[outputIndex++] = data.file.getName().getRootURI();
// See if we need to add the row number to the row...
if ( meta.includeRowNumber() && !Utils.isEmpty( meta.getRowNumberField() ) ) {
extraData[outputIndex++] = new Long( data.rownr );
}
data.rownr++;
// Add row dataView on GitHub (pinned to f3058517a1)