{"record":{"id":"73594c702737ef72","repo":"alibaba/canal","slug":"error-load-config-73594c","errorCode":null,"errorMessage":"ERROR load Config: {} {}","messagePattern":"ERROR load Config: (.+?) (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"client-adapter/kudu/src/main/java/com/alibaba/otter/canal/client/adapter/kudu/config/KuduMappingConfigLoader.java","lineNumber":40,"sourceCode":"     * 加载HBase表映射配置\n     *\n     * @return 配置名/配置文件名--对象\n     */\n    public static Map<String, KuduMappingConfig> load(Properties envProperties) {\n        logger.info(\"## Start loading kudu mapping config ... \");\n\n        Map<String, KuduMappingConfig> result = new LinkedHashMap<>();\n\n        Map<String, String> configContentMap = MappingConfigsLoader.loadConfigs(\"kudu\");\n        configContentMap.forEach((fileName, content) -> {\n            KuduMappingConfig config = YamlUtils.ymlToObj(null, content, KuduMappingConfig.class, null, envProperties);\n            if (config == null) {\n                return;\n            }\n            try {\n                config.validate();\n            } catch (Exception e) {\n                throw new RuntimeException(\"ERROR load Config: \" + fileName + \" \" + e.getMessage(), e);\n            }\n            result.put(fileName, config);\n        });\n\n        logger.info(\"## kudu mapping config loaded\");\n        return result;\n    }\n}\n","sourceCodeStart":22,"sourceCodeEnd":49,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/client-adapter/kudu/src/main/java/com/alibaba/otter/canal/client/adapter/kudu/config/KuduMappingConfigLoader.java#L22-L49","documentation":"Thrown by KuduMappingConfigLoader.load() as a wrapper around any exception from config.validate() for a given kudu mapping file. The message embeds the fileName and the underlying cause's message, and the original exception is chained, so the real validation defect is identifiable from the cause.","triggerScenarios":"For a loaded kudu yml, config.validate() throws (e.g. NullPointerException for a missing database). The loader catches it and rethrows a RuntimeException prefixed with 'ERROR load Config: <fileName>'.","commonSituations":"A kudu yml is missing a required field such as database; the fileName in the message tells you exactly which file to fix.","solutions":["Read the fileName and the chained cause message in the stack trace to find the offending field (e.g. 'KuduMapping.database').","Open that named yml and supply the missing/invalid field.","Restart the adapter."],"exampleFix":"# Error: ERROR load Config: kudu/bad.yml KuduMapping.database\n# before (kudu/bad.yml)\nkuduMapping:\n  table: user\n# after\nkuduMapping:\n  database: mytest\n  table: user","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Map<String, KuduMappingConfig> all = KuduMappingConfigLoader.load(envProperties);\n} catch (RuntimeException e) {\n    // e.getMessage() starts with \"ERROR load Config: <fileName> <cause>\"\n    String file = e.getMessage().replaceAll(\"^ERROR load Config: (\\\\S+).*\", \"$1\");\n    logger.error(\"Kudu mapping file failed validation: {}\", file, e.getCause());\n    throw e;\n}","preventionTips":["Treat the chained cause as the real error; the fileName tells you which yml to fix.","Validate all kudu yml files in CI by calling KuduMappingConfigLoader.load() against a test Properties."],"tags":["kudu","config-validation","canal","loader"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}