pentaho/pentaho-kettle · error · KettleException
AccessInput.Error.ErrorReadingFile
AccessInput.Error.ErrorReadingFile
Error message
AccessInput.Error.ErrorReadingFile
What it means
Generic KettleException thrown in AccessInput.getOneRow when any exception occurs while reading a row from the currently open MS Access file via Jackcess (getting the table, columns, or values). It wraps the original exception with the localized 'Error reading file' message, so the cause chain holds the real problem.
Solutions
- Inspect the wrapped cause exception (e.getCause()) for the real error (e.g. 'Table not found', 'Incorrect password format', I/O error).
- Close any MS Access sessions locking the .mdb/.accdb file and ensure the file is not read-locked on a network share.
- Run Compact & Repair in MS Access on the database, or export the data to a fresh file.
- Verify the table name configured in the Access Input step still exists in each file being processed.
- If the file is .accdb with complex encrypted columns, check Jackcess/JackcessEncrypt version support in the PDI installation.
Defensive patterns
Strategy: try-catch
Validate before calling
// before running: verify each configured file is readable and not locked
for ( String f : files ) {
File file = new File( f );
if ( !file.canRead() ) throw new IllegalStateException( "Unreadable: " + f );
try ( RandomAccessFile raf = new RandomAccessFile( file, "rw" ) ) { /* lock probe */ }
} Try / catch
try { /* run transformation / preview rows */ } catch ( KettleException e ) { Throwable cause = e.getCause(); logError( "Access read failed: " + ( cause != null ? cause.getMessage() : e.getMessage() ), e ); } Prevention
- Close MS Access sessions before running PDI against the file
- Run Compact & Repair periodically on Access databases
- Preview rows in Spoon before production runs to catch table/column changes
- Pin compatible Jackcess versions in the PDI classpath
When it happens
Trigger: Any failure inside the row-reading loop of the Access Input step: the .mdb/.accdb file is corrupt or locked by another process, the configured table disappears mid-run, a column read fails (type unsupported by Jackcess), or the database handle was closed unexpectedly.
Common situations: File locked by an open MS Access session; corrupt Access database (needs Compact & Repair); password-protected Access files unsupported by the configured Jackcess mode; table renamed/deleted between design-time and run-time; 32-bit Jet vs Jackcess incompatibilities.
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.Exception.CouldnotFindField
- AccessInput.Log.NoField
- A step in transformation [" + transMeta.toString() + "]…
- AccessInput.Log.RequiredFilesMissing
- AccessInput.Log.RequiredNotAccessibleFilesMissing
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/20dcdbb36c3d873f.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ms-access/impl/src/main/java/org/pentaho/di/trans/steps/accessinput/AccessInput.java:209
// Add Uri
if ( meta.getUriField() != null && meta.getUriField().length() > 0 ) {
r[rowIndex++] = data.uriName;
}
// Add RootUri
if ( meta.getRootUriField() != null && meta.getRootUriField().length() > 0 ) {
r[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, "AccessInput.Error.ErrorReadingFile" ), e );
}
return r;
}
private boolean openNextFile() {
try {
if ( !meta.isFileField() ) {
// finished processing!
if ( data.filenr >= data.files.nrOfFiles() ) {
if ( log.isDetailed() ) {
logDetailed( BaseMessages.getString( PKG, "AccessInput.Log.FinishedProcessing" ) );
}
return false;
}
// Is this the last file?
data.last_file = ( data.filenr == data.files.nrOfFiles() - 1 );View on GitHub (pinned to f3058517a1)