apache/seatunnel · error · TableNotExistException

Table ${tablePath} does not exist in catalog ${catalogName}

Error message

Table ${tablePath} does not exist in catalog ${catalogName}

What it means

PaimonCatalog.getTable wraps all failures from fetching/converting a Paimon table into SeaTunnel's TableNotExistException for this catalog. Because the catch block swallows every exception type, any error loading or converting the FileStoreTable surfaces as 'table does not exist', which can mask the real cause.

Source

Thrown at seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalog.java:150

        List<String> tables = new ArrayList<>();
        try {
            if (databaseExists(identifier.getDatabaseName())) {
                tables = catalog.listTables(identifier.getDatabaseName());
            }
        } catch (org.apache.paimon.catalog.Catalog.DatabaseNotExistException e) {
            return false;
        }
        return tables.contains(identifier.getTableName());
    }

    @Override
    public CatalogTable getTable(TablePath tablePath)
            throws CatalogException, TableNotExistException {
        try {
            FileStoreTable paimonFileStoreTableTable = (FileStoreTable) getPaimonTable(tablePath);
            return toCatalogTable(paimonFileStoreTableTable, tablePath);
        } catch (Exception e) {
            throw new TableNotExistException(this.catalogName, tablePath);
        }
    }

    public CatalogTable getTableWithProjection(TablePath tablePath, int[] projectionIndex)
            throws CatalogException, TableNotExistException {
        try {
            FileStoreTable paimonFileStoreTableTable = (FileStoreTable) getPaimonTable(tablePath);
            return toCatalogTable(paimonFileStoreTableTable, tablePath, projectionIndex);
        } catch (Exception e) {
            throw new TableNotExistException(this.catalogName, tablePath);
        }
    }

    @Override
    public Table getPaimonTable(TablePath tablePath)
            throws CatalogException, TableNotExistException {
        try {
            return catalog.getTable(toIdentifier(tablePath));

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Confirm the table path (database.table) exists in the Paimon warehouse/metastore, including case.
  2. Check warehouse/metastore config matches the environment containing the table.
  3. Inspect the underlying cause: enable debug logs or open the warehouse directory to see if the real failure is schema conversion rather than a missing table.
  4. Use getPaimonTable to get a narrower native exception when debugging.

Example fix

// before
catalog.getTable(TablePath.of("db1", "Table1")); // actual table "table1"
// after
if (catalog.tableExists(TablePath.of("db1", "table1"))) {
    catalog.getTable(TablePath.of("db1", "table1"));
}
Defensive patterns

Strategy: try-catch

Validate before calling

TablePath tp = TablePath.of(db, table);
if (!catalog.tableExists(tp)) {
    throw new IllegalArgumentException("Table missing: " + tp);
}

Try / catch

try {
    CatalogTable t = catalog.getTable(tablePath);
} catch (TableNotExistException e) {
    // may be a masked conversion failure; check warehouse dir/logs for the real cause
    throw e;
}

Prevention

When it happens

Trigger: Calling getTable(tablePath) (directly or via toCatalogTable) when the Paimon table is missing at the identifier, the database is missing, the table is not a FileStoreTable, or schema conversion throws — all collapsed to TableNotExistException.

Common situations: Table name typo/case mismatch, reading a table that was dropped, schema-file corruption in the warehouse, or an unrelated conversion exception being misreported as not-exist.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/263c41adcacde1be. Report an issue: GitHub.