apache/seatunnel · error · SeaTunnelException

Can not find catalog table with factoryId [%s]

Error message

Can not find catalog table with factoryId [%s]

What it means

When no explicit schema is configured, getCatalogTables opens the connector's Catalog and calls getTables; if the catalog returns an empty table list, the utility cannot proceed and throws SeaTunnelException naming the factoryId (connector).

Source

Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/CatalogTableUtil.java:129

        }

        Optional<Catalog> optionalCatalog =
                FactoryUtil.createOptionalCatalog(
                        factoryId, readonlyConfig, classLoader, factoryId);
        return optionalCatalog
                .map(
                        c -> {
                            try (Catalog catalog = c) {
                                long startTime = System.currentTimeMillis();
                                catalog.open();
                                List<CatalogTable> catalogTables =
                                        catalog.getTables(readonlyConfig);
                                log.info(
                                        String.format(
                                                "Get catalog tables, cost time: %d ms",
                                                System.currentTimeMillis() - startTime));
                                if (catalogTables.isEmpty()) {
                                    throw new SeaTunnelException(
                                            String.format(
                                                    "Can not find catalog table with factoryId [%s]",
                                                    factoryId));
                                }
                                return catalogTables;
                            }
                        })
                .orElseThrow(
                        () ->
                                new SeaTunnelException(
                                        String.format(
                                                "Can not find catalog with factoryId [%s]",
                                                factoryId)));
    }

    public static CatalogTable buildWithConfig(Config config) {
        ReadonlyConfig readonlyConfig = ReadonlyConfig.fromConfig(config);
        return buildWithConfig(readonlyConfig);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Fix table-names/database patterns in the config to match existing tables (watch case sensitivity)
  2. Verify catalog connection settings and that the configured user can list the tables
  3. Check the source database actually contains the expected tables

Example fix

// before
table-names = ["prod.orderss"]   // typo
// after
table-names = ["prod.orders"]
Defensive patterns

Strategy: validation

Validate before calling

List<String> expected = cfg.get("table-names");
// verify via catalog: tables = catalog.getTables(...); assert !tables.isEmpty();

Try / catch

try { tables = CatalogTableUtil.getCatalogTables(factoryId, cfg, cl); } catch (SeaTunnelException e) { /* check table-names / credentials */ }

Prevention

When it happens

Trigger: Connector config with table-names/database patterns that match nothing, or credentials lacking permission to list tables, causing catalog.getTables(readonlyConfig) to return an empty collection.

Common situations: Typo in database/table names or case mismatch (e.g. MySQL lower_case_table_names); wrong catalog URL or user without metadata privileges; source database genuinely empty while sync job expects tables.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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