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

  1. Inspect the wrapped cause for the root IOException
  2. Test the file opens in Microsoft Access or Jackcess directly
  3. Close other processes holding a lock on the file (delete .ldb lock file)
  4. Repair/compact the Access database
  5. 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

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


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)