alibaba/canal · error · RuntimeException
ERROR Config: {fileName} {errorMessage}
Error message
ERROR Config: {fileName} {errorMessage} What it means
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.
Source
Thrown at client-adapter/rdb/src/main/java/com/alibaba/otter/canal/client/adapter/rdb/config/ConfigLoader.java:42
* 加载RDB表映射配置
*
* @return 配置名/配置文件名--对象
*/
public static Map<String, MappingConfig> load(Properties envProperties) {
logger.info("## Start loading rdb mapping config ... ");
Map<String, MappingConfig> result = new LinkedHashMap<>();
Map<String, String> configContentMap = MappingConfigsLoader.loadConfigs("rdb");
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("## Rdb mapping config loaded");
return result;
}
}
View on GitHub (pinned to 87be50e876)
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.
Example fix
# Error: ERROR Config: rdb/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("Rdb mapping file failed validation: {}", file, e.getCause());
throw e;
} Prevention
- Use the chained cause and fileName to find the bad rdb yml.
- Dry-load all rdb yml files in CI.
When it happens
Trigger: For a loaded rdb yml, MappingConfig.validate() throws (e.g. NullPointerException for missing database/table/targetTable); the loader rethrows with 'ERROR Config: <fileName> <cause>'.
Common situations: An rdb yml is missing a required field; the fileName in the message identifies the file.
Related errors
- ERROR load Config: {} {}
- ERROR Config: {fileName} {errorMessage}
- dbMapping.database
- dbMapping.table
- dbMapping.targetTable
AI-assisted analysis of alibaba/canal@87be50e876 (2026-08-14).
Data as JSON: /api/errors/5392855fa90fb5cc.
Report an issue: GitHub.