alibaba/canal · error · RuntimeException
ERROR Config: {fileName} {errorMessage}
Error message
ERROR Config: {fileName} {errorMessage} What it means
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.
Source
Thrown at client-adapter/phoenix/src/main/java/com/alibaba/otter/canal/client/adapter/phoenix/config/ConfigLoader.java:38
* 加载Phoenix表映射配置
*
* @return 配置名/配置文件名--对象
*/
public static Map<String, MappingConfig> load(Properties envProperties) {
logger.info("## Start loading phoenix mapping config ... ");
Map<String, MappingConfig> result = new LinkedHashMap<>();
Map<String, String> configContentMap = MappingConfigsLoader.loadConfigs("phoenix");
configContentMap.forEach((fileName, content) -> {
MappingConfig config = YamlUtils.ymlToObj(null, content, MappingConfig.class, null, envProperties);
if (config == null) {
return;
}
try {
config.validate();
} catch (Exception e) {
throw new RuntimeException("ERROR Config: " + fileName + " " + e.getMessage(), e);
}
result.put(fileName, config);
});
logger.info("## Phoenix mapping config loaded");
logger.info("## Phoenix sync threads: " + ConfigurationManager.getInteger("threads"));
return result;
}
}
View on GitHub (pinned to 87be50e876)
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.
Example fix
# Error: ERROR Config: phoenix/bad.yml dbMapping.table # before /dbMapping: database: mytest # after dbMapping: database: mytest table: user
Defensive patterns
Strategy: try-catch
Try / catch
try {
Map<String, MappingConfig> all = ConfigLoader.load(envProperties);
} catch (RuntimeException e) {
String file = e.getMessage().replaceAll("^ERROR Config: (\\S+).*", "$1");
logger.error("Phoenix mapping file failed validation: {}", file, e.getCause());
throw e;
} Prevention
- 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.
When it happens
Trigger: For a loaded phoenix yml, MappingConfig.validate() throws (e.g. NullPointerException for missing database/table/targetTable); the loader rethrows with 'ERROR Config: <fileName> <cause>'.
Common situations: A phoenix yml is missing a required field; the fileName in the message identifies the file.
Related errors
- ERROR load Config: {} {}
- dbMapping.database
- dbMapping.table
- dbMapping.targetTable
- ERROR Config: {fileName} {errorMessage}
AI-assisted analysis of alibaba/canal@87be50e876 (2026-08-14).
Data as JSON: /api/errors/77fcc6f125b58ace.
Report an issue: GitHub.