{"record":{"id":"fd4accd92690c21f","repo":"pentaho/pentaho-kettle","slug":"accessoutputmeta-exception-tabledoesnotexist","errorCode":"AccessOutputMeta.Exception.TableDoesNotExist","errorMessage":"AccessOutputMeta.Exception.TableDoesNotExist","messagePattern":"AccessOutputMeta\\.Exception\\.TableDoesNotExist","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/ms-access/impl/src/main/java/org/pentaho/di/trans/steps/accessoutput/AccessOutputMeta.java","lineNumber":259,"sourceCode":"  public StepDataInterface getStepData() {\n    return new AccessOutputData();\n  }\n\n  public RowMetaInterface getRequiredFields( VariableSpace space ) throws KettleException {\n    String realFilename = space.environmentSubstitute( filename );\n    File file = new File( realFilename );\n    try {\n      if ( !file.exists() || !file.isFile() ) {\n        throw new KettleException( BaseMessages.getString(\n          PKG, \"AccessOutputMeta.Exception.FileDoesNotExist\", realFilename ) );\n      }\n\n      // Open the database in read-only mode and get the table metadata.\n      try ( Database db = new DatabaseBuilder( file ).setReadOnly( true ).open() ) {\n        String realTablename = space.environmentSubstitute( tablename );\n        Table table = db.getTable( realTablename );\n        if ( table == null ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"AccessOutputMeta.Exception.TableDoesNotExist\", realTablename ) );\n        }\n\n        return getLayout( table );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"AccessOutputMeta.Exception.ErrorGettingFields\" ), e );\n    }\n  }\n\n  public static final RowMetaInterface getLayout( Table table ) throws KettleStepException {\n    RowMetaInterface row = new RowMeta();\n    List<? extends Column> columns = table.getColumns();\n    for ( int i = 0; i < columns.size(); i++ ) {\n      ColumnLayout layout = resolveColumnLayout( columns.get( i ) );\n      row.addValueMeta( createValueMeta( columns.get( i ).getName(), layout ) );\n    }\n","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/ms-access/impl/src/main/java/org/pentaho/di/trans/steps/accessoutput/AccessOutputMeta.java#L241-L277","documentation":"While reading required fields, AccessOutputMeta opens the Access database read-only and calls db.getTable(realTablename). If the configured table does not exist in the database, getTable returns null and a KettleException with AccessOutputMeta.Exception.TableDoesNotExist is thrown.","triggerScenarios":"getRequiredFields invoked when the tablename configured in the step (after variable substitution) has no matching table in the .mdb/.accdb file, including case or whitespace mismatches.","commonSituations":"Table renamed or dropped since the step was configured; wrong table name typo; variable substitution resolving to a different table name; pointing the step at a different Access file that lacks the table.","solutions":["Verify the table exists in the Access file (open it in Access or a viewer)","Correct the table name in the step settings, matching exact casing","Check the environment variable used in the table name resolves correctly","Confirm the step points at the intended database file","Recreate the table in the Access database if it was dropped"],"exampleFix":"// before\nmeta.setTablename(\"${TABLE_VAR}\");\n// after\nDatabase db = new DatabaseBuilder(file).setReadOnly(true).open();\nif (!db.getTableNames().contains(resolvedTable)) {\n  throw new IllegalStateException(\"Table missing: \" + resolvedTable);\n}\nmeta.setTablename(resolvedTable);","handlingStrategy":"validation","validationCode":"try (Database db = new DatabaseBuilder(file).setReadOnly(true).open()) {\n  String t = space.environmentSubstitute(meta.getTablename());\n  if (!db.getTableNames().contains(t)) {\n    throw new IllegalArgumentException(\"Table not found in Access DB: \" + t);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["List tables in the Access file before configuring the step","Match table name exactly (case/whitespace)","Define table-name variables in the runtime environment","Track schema changes in the Access DB source"],"tags":["access","table","configuration","pdi"],"backgroundTag":"resource-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}