{"record":{"id":"5392855fa90fb5cc","repo":"alibaba/canal","slug":"error-config-filename-errormessage-539285","errorCode":null,"errorMessage":"ERROR Config: {fileName} {errorMessage}","messagePattern":"ERROR Config: (.+?) (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/config/ConfigLoader.java","lineNumber":42,"sourceCode":"     * 加载RDB表映射配置\r\n     *\r\n     * @return 配置名/配置文件名--对象\r\n     */\r\n    public static Map<String, MappingConfig> load(Properties envProperties) {\r\n        logger.info(\"## Start loading rdb mapping config ... \");\r\n\r\n        Map<String, MappingConfig> result = new LinkedHashMap<>();\r\n\r\n        Map<String, String> configContentMap = MappingConfigsLoader.loadConfigs(\"rdb\");\r\n        configContentMap.forEach((fileName, content) -> {\r\n            MappingConfig config = YamlUtils.ymlToObj(null, content, MappingConfig.class, null, envProperties);\r\n            if (config == null) {\r\n                return;\r\n            }\r\n            try {\r\n                config.validate();\r\n            } catch (Exception e) {\r\n                throw new RuntimeException(\"ERROR Config: \" + fileName + \" \" + e.getMessage(), e);\r\n            }\r\n            result.put(fileName, config);\r\n        });\r\n\r\n        logger.info(\"## Rdb mapping config loaded\");\r\n        return result;\r\n    }\r\n}\r\n","sourceCodeStart":24,"sourceCodeEnd":51,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/config/ConfigLoader.java#L24-L51","documentation":"Thrown by the rdb ConfigLoader.load() as a wrapper around any exception from config.validate() for a given rdb mapping file. It embeds the fileName and the underlying cause message and chains the original exception.","triggerScenarios":"For a loaded rdb yml, MappingConfig.validate() throws (e.g. NullPointerException for missing database/table/targetTable); the loader rethrows with 'ERROR Config: <fileName> <cause>'.","commonSituations":"An rdb yml is missing a required field; the fileName in the message identifies the file.","solutions":["Use the fileName and chained cause in the stack trace to find the missing field.","Open that yml and supply the field (note table/targetTable are skipped only when mirrorDb is true).","Restart the adapter."],"exampleFix":"# Error: ERROR Config: rdb/bad.yml dbMapping.table\n# before\ndbMapping:\n  database: mytest\n# after\ndbMapping:\n  database: mytest\n  table: user","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Map<String, MappingConfig> all = ConfigLoader.load(envProperties);\n} catch (RuntimeException e) {\n    String file = e.getMessage().replaceAll(\"^ERROR Config: (\\\\S+).*\", \"$1\");\n    logger.error(\"Rdb mapping file failed validation: {}\", file, e.getCause());\n    throw e;\n}","preventionTips":["Use the chained cause and fileName to find the bad rdb yml.","Dry-load all rdb yml files in CI."],"tags":["rdb","config-validation","canal","loader"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}