{"record":{"id":"2a37ef970eb54ce3","repo":"apache/seatunnel","slug":"tables-configs-can-not-be-empty","errorCode":null,"errorMessage":"tables_configs can not be empty","messagePattern":"tables_configs can not be empty","errorType":"validation","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mongodb/MongodbIncrementalSourceFactory.java","lineNumber":151,"sourceCode":"                    ILLEGAL_ARGUMENT,\n                    \"The number of collections must be equal to the number of schema tables\");\n        }\n    }\n\n    private List<CatalogTable> buildWithConfig(ReadonlyConfig config) {\n        String factoryId = config.get(ConnectorCommonOptions.PLUGIN_NAME).replace(\"-CDC\", \"\");\n        Map<String, Object> schemaMap = config.get(ConnectorCommonOptions.SCHEMA);\n        if (schemaMap != null) {\n            if (schemaMap.isEmpty()) {\n                throw new SeaTunnelException(\"Schema config can not be empty\");\n            }\n            CatalogTable catalogTable = CatalogTableUtil.buildWithConfig(factoryId, config);\n            return Collections.singletonList(catalogTable);\n        }\n        List<Map<String, Object>> schemaMaps = config.get(ConnectorCommonOptions.TABLE_CONFIGS);\n        if (schemaMaps != null) {\n            if (schemaMaps.isEmpty()) {\n                throw new SeaTunnelException(\"tables_configs can not be empty\");\n            }\n            return schemaMaps.stream()\n                    .map(\n                            map ->\n                                    CatalogTableUtil.buildWithConfig(\n                                            factoryId, ReadonlyConfig.fromMap(map)))\n                    .collect(Collectors.toList());\n        }\n        return Collections.emptyList();\n    }\n}\n","sourceCodeStart":133,"sourceCodeEnd":163,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mongodb/MongodbIncrementalSourceFactory.java#L133-L163","documentation":"Validation in MongodbIncrementalSourceFactory.buildWithConfig: the tables_configs option supplying per-collection table definitions is empty or missing entries, so catalog tables cannot be constructed for the collections to capture.","triggerScenarios":"Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mongodb/MongodbIncrementalSourceFactory.java:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Populate tables_configs with a table definition for each collection to capture","Ensure the number of tables_configs entries matches the collections list","Omit tables_configs if schema should be inferred from sampled documents"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}