pentaho/pentaho-kettle · error · KettleException
PropertyInput.Error.CanNotReadFromFile
Error message
PropertyInput.Error.CanNotReadFromFile
What it means
PropertyInput.getOneRow() wraps any exception that occurs while reading a record from the current properties/INI file into a KettleException with this message and the file name. It indicates the file could not be parsed/read at the point of row production.
Solutions
- Verify the file is a valid .properties/.ini file and open it manually
- Match the encoding setting in the step dialog to the file's actual encoding
- Check the wrapped cause (e.getCause()) for the underlying I/O or parse error
- Repair or regenerate the corrupt file
- Enable step-level error handling to route bad files to an error stream instead of failing the transformation
Example fix
// before: default charset mismatch
meta.setEncoding(null);
// after
meta.setEncoding("UTF-8"); // match the actual file encoding
// and configure error handling:
stepMeta.getStepErrorMeta().setEnabled(true); Defensive patterns
Strategy: try-catch
Validate before calling
// sanity-check the file before pointing the step at it
File f = new File(path);
if (!f.isFile() || f.length() == 0) throw new IllegalStateException("Not a valid properties file: " + path); Try / catch
try {
transformation.execute(params);
} catch (KettleException e) {
if (e.getMessage() != null && e.getMessage().contains("CanNotReadFromFile")) {
logError("Cannot read " + extractFile(e.getMessage()) + ": " + e.getCause());
// route to error handling / skip file
} else { throw e; }
} Prevention
- Confirm input files are true .properties/.ini text files, not binary
- Set the step's encoding to match the file encoding
- Add step error handling to divert bad files instead of aborting the run
- Keep error-handling rowsets so corrupted files can be inspected later
When it happens
Trigger: An I/O or parse error inside loadProperties/loadIniFile while fetching the next row — corrupt or binary file passed in, encoding mismatch, unreadable file after open, or malformed INI content.
Common situations: Pointing the step at a non-properties/binary file; wrong encoding configured for the file; file truncated or removed mid-run; invalid INI syntax that the ini4j parser chokes on.
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
- AccessInput.Error.ErrorReadingFile
- ChangeFileEncoding.Exception.TargetEncodingEmpty
- ConcatFields.Error.UnsupportedEncoding
- Could not read file
- GPLoadDataOutput.Exception" + e.getMessage()
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/e40557ef9d15925f.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/propertyinput/PropertyInput.java:302
}
// Add Uri
if ( !Utils.isEmpty( meta.getUriField() ) ) {
r[data.totalpreviousfields + rowIndex++] = data.uriName;
}
// Add RootUri
if ( !Utils.isEmpty( meta.getRootUriField() ) ) {
r[data.totalpreviousfields + rowIndex++] = data.rootUriName;
}
RowMetaInterface iRow = getInputRowMeta();
data.previousRow = iRow == null ? r : iRow.cloneRow( r ); // copy it to make
// surely the next step doesn't change it in between...
incrementLinesInput();
data.rownr++;
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "PropertyInput.Error.CanNotReadFromFile", data.file
.toString() ), e );
}
return r;
}
private boolean openNextFile() {
try {
if ( !meta.isFileField() ) {
if ( data.filenr >= data.files.nrOfFiles() ) { // finished processing!
if ( log.isDetailed() ) {
logDetailed( BaseMessages.getString( PKG, "PropertyInput.Log.FinishedProcessing" ) );
}
return false;
}
// Is this the last file?View on GitHub (pinned to f3058517a1)