{"record":{"id":"5575761064efd7c8","repo":"apache/seatunnel","slug":"can-not-find-catalog-table-with-factoryid-s","errorCode":null,"errorMessage":"Can not find catalog table with factoryId [%s]","messagePattern":"Can not find catalog table with factoryId \\[(.+?)\\]","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/CatalogTableUtil.java","lineNumber":129,"sourceCode":"        }\n\n        Optional<Catalog> optionalCatalog =\n                FactoryUtil.createOptionalCatalog(\n                        factoryId, readonlyConfig, classLoader, factoryId);\n        return optionalCatalog\n                .map(\n                        c -> {\n                            try (Catalog catalog = c) {\n                                long startTime = System.currentTimeMillis();\n                                catalog.open();\n                                List<CatalogTable> catalogTables =\n                                        catalog.getTables(readonlyConfig);\n                                log.info(\n                                        String.format(\n                                                \"Get catalog tables, cost time: %d ms\",\n                                                System.currentTimeMillis() - startTime));\n                                if (catalogTables.isEmpty()) {\n                                    throw new SeaTunnelException(\n                                            String.format(\n                                                    \"Can not find catalog table with factoryId [%s]\",\n                                                    factoryId));\n                                }\n                                return catalogTables;\n                            }\n                        })\n                .orElseThrow(\n                        () ->\n                                new SeaTunnelException(\n                                        String.format(\n                                                \"Can not find catalog with factoryId [%s]\",\n                                                factoryId)));\n    }\n\n    public static CatalogTable buildWithConfig(Config config) {\n        ReadonlyConfig readonlyConfig = ReadonlyConfig.fromConfig(config);\n        return buildWithConfig(readonlyConfig);","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/CatalogTableUtil.java#L111-L147","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Fix table-names/database patterns in the config to match existing tables (watch case sensitivity)","Verify catalog connection settings and that the configured user can list the tables","Check the source database actually contains the expected tables"],"exampleFix":"// before\ntable-names = [\"prod.orderss\"]   // typo\n// after\ntable-names = [\"prod.orders\"]","handlingStrategy":"validation","validationCode":"List<String> expected = cfg.get(\"table-names\");\n// verify via catalog: tables = catalog.getTables(...); assert !tables.isEmpty();","typeGuard":null,"tryCatchPattern":"try { tables = CatalogTableUtil.getCatalogTables(factoryId, cfg, cl); } catch (SeaTunnelException e) { /* check table-names / credentials */ }","preventionTips":["Verify table-names patterns match real tables and case","Confirm catalog user has metadata list privileges","Dry-run against the source database first"],"tags":["catalog","table-not-found","config"],"backgroundTag":"empty-result-set","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}