pentaho/pentaho-kettle · error · KettleException
AccessOutputMeta.Exception.ErrorGettingFields
AccessOutputMeta.Exception.ErrorGettingFields
Error message
AccessOutputMeta.Exception.ErrorGettingFields
What it means
AccessOutputMeta.getRequiredFields wraps any exception encountered while reading the table's layout (columns, types, lengths) into KettleException(AccessOutputMeta.Exception.ErrorGettingFields). It is a catch-all around database open/read so callers get a single, labeled failure for field extraction problems.
Solutions
- Inspect the wrapped cause for the root IOException
- Test the file opens in Microsoft Access or Jackcess directly
- Close other processes holding a lock on the file (delete .ldb lock file)
- Repair/compact the Access database
- Upgrade the Jackcess/PDI version to support the Access file format
Example fix
null
Defensive patterns
Strategy: try-catch
Validate before calling
File f = new File(space.environmentSubstitute(meta.getFilename()));
if (!f.canRead()) throw new IllegalStateException("Access DB not readable: " + f);
// check no lock file (.ldb) indicates exclusive open by another process Try / catch
try {
RowMetaInterface fields = meta.getRequiredFields(space);
} catch (KettleException e) {
log.error("Error reading Access fields", e.getCause());
// repair DB, close locking process, or upgrade Jackcess
} Prevention
- Ensure the Access file is not open exclusively elsewhere
- Compact/repair Access databases periodically
- Use supported Access file formats for the bundled Jackcess version
- Check file readability on the execution host
When it happens
Trigger: getRequiredFields fails for reasons other than the file/table checks: the Access file is corrupt or locked, Jackcess throws IOException while opening/reading the table, or the file is an unsupported Access version.
Common situations: Corrupted .mdb after an abrupt shutdown; file locked by another process; password-protected Access DB; newer .accdb features unsupported by the Jackcess version in use.
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
- AccessInputMeta.Exception.FileDoesNotExist
- AccessOutputMeta.Exception.FileDoesNotExist
- AccessOutputMeta.Exception.FileDoesNotExist
- AccessOutputMeta.Exception.TableDoesNotExist
- Cannot open control file
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/6a5984b3e701dd6e.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/ms-access/impl/src/main/java/org/pentaho/di/trans/steps/accessoutput/AccessOutputMeta.java:266
try {
if ( !file.exists() || !file.isFile() ) {
throw new KettleException( BaseMessages.getString(
PKG, "AccessOutputMeta.Exception.FileDoesNotExist", realFilename ) );
}
// Open the database in read-only mode and get the table metadata.
try ( Database db = new DatabaseBuilder( file ).setReadOnly( true ).open() ) {
String realTablename = space.environmentSubstitute( tablename );
Table table = db.getTable( realTablename );
if ( table == null ) {
throw new KettleException( BaseMessages.getString(
PKG, "AccessOutputMeta.Exception.TableDoesNotExist", realTablename ) );
}
return getLayout( table );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG, "AccessOutputMeta.Exception.ErrorGettingFields" ), e );
}
}
public static final RowMetaInterface getLayout( Table table ) throws KettleStepException {
RowMetaInterface row = new RowMeta();
List<? extends Column> columns = table.getColumns();
for ( int i = 0; i < columns.size(); i++ ) {
ColumnLayout layout = resolveColumnLayout( columns.get( i ) );
row.addValueMeta( createValueMeta( columns.get( i ).getName(), layout ) );
}
return row;
}
private static ColumnLayout resolveColumnLayout( Column column ) throws KettleStepException {
int type = getSqlType( column );
switch ( type ) {
case java.sql.Types.CHAR:View on GitHub (pinned to f3058517a1)