{"record":{"id":"77fcc6f125b58ace","repo":"alibaba/canal","slug":"error-config-filename-errormessage","errorCode":null,"errorMessage":"ERROR Config: {fileName} {errorMessage}","messagePattern":"ERROR Config: (.+?) (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"client-adapter/phoenix/src/main/java/com/alibaba/otter/canal/client/adapter/phoenix/config/ConfigLoader.java","lineNumber":38,"sourceCode":"     * 加载Phoenix表映射配置\n     *\n     * @return 配置名/配置文件名--对象\n     */\n    public static Map<String, MappingConfig> load(Properties envProperties) {\n        logger.info(\"## Start loading phoenix mapping config ... \");\n\n        Map<String, MappingConfig> result = new LinkedHashMap<>();\n\n        Map<String, String> configContentMap = MappingConfigsLoader.loadConfigs(\"phoenix\");\n        configContentMap.forEach((fileName, content) -> {\n            MappingConfig config = YamlUtils.ymlToObj(null, content, MappingConfig.class, null, envProperties);\n            if (config == null) {\n                return;\n            }\n            try {\n                config.validate();\n            } catch (Exception e) {\n                throw new RuntimeException(\"ERROR Config: \" + fileName + \" \" + e.getMessage(), e);\n            }\n            result.put(fileName, config);\n        });\n\n        logger.info(\"## Phoenix mapping config loaded\");\n        logger.info(\"## Phoenix sync threads: \" + ConfigurationManager.getInteger(\"threads\"));\n        return result;\n    }\n}\n","sourceCodeStart":20,"sourceCodeEnd":48,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client-adapter/phoenix/src/main/java/com/alibaba/otter/canal/client/adapter/phoenix/config/ConfigLoader.java#L20-L48","documentation":"Thrown by the phoenix ConfigLoader.load() as a wrapper around any exception from config.validate() for a given phoenix mapping file. It embeds the fileName and the underlying cause message and chains the original exception.","triggerScenarios":"For a loaded phoenix yml, MappingConfig.validate() throws (e.g. NullPointerException for missing database/table/targetTable); the loader rethrows with 'ERROR Config: <fileName> <cause>'.","commonSituations":"A phoenix 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 (e.g. 'dbMapping.table').","Open that yml and supply the field.","Restart the adapter."],"exampleFix":"# Error: ERROR Config: phoenix/bad.yml dbMapping.table\n# before\n/dbMapping:\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(\"Phoenix mapping file failed validation: {}\", file, e.getCause());\n    throw e;\n}","preventionTips":["Use the chained cause and fileName to locate the bad phoenix yml.","Dry-load all phoenix yml files in CI to catch validation errors before deploy."],"tags":["phoenix","config-validation","canal","loader"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}