apache/incubator-seata · error · IllegalArgumentException
not support config data type suffix: %s
Error message
not support config data type suffix: %s
What it means
Thrown by ConfigDataType.getTypeBySuffix(String suffix) when the file suffix is not registered for any enum constant. The enum maps 'yaml' and 'yml' to yaml and 'properties' to properties; ConfigProcessor calls this on the last dot-segment of a config file name to select a parser, so an unsupported extension fails config loading.
Source
Thrown at config/seata-config-core/src/main/java/org/apache/seata/config/processor/ConfigDataType.java:71
}
throw new IllegalArgumentException("not support config data type type: " + name);
}
/**
* Gets type by suffix.
*
* @param suffix the suffix
* @return the type
*/
public static ConfigDataType getTypeBySuffix(String suffix) {
for (ConfigDataType configDataType : values()) {
for (String sfx : configDataType.suffix) {
if (sfx.equals(suffix)) {
return configDataType;
}
}
}
throw new IllegalArgumentException("not support config data type suffix: " + suffix);
}
}
View on GitHub (pinned to e01f97c6db)
Solutions
- Rename or point the config reference to a file ending in .yaml, .yml, or .properties
- If you must keep .conf, convert its content to properties syntax and rename it to .properties
- Verify the exact path passed to ConfigProcessor — the last segment after '.' is what is matched, so 'my.config.v2' resolves to suffix 'v2' and fails
- For custom formats, add an enum constant with its suffixes and register a corresponding ConfigProcessor
Example fix
// before String dataId = "seata-server.conf"; processor.parserDataId(content, dataId); // suffix 'conf' -> throws // after String dataId = "seata-server.properties"; processor.parserDataId(content, dataId); // ok
Defensive patterns
Strategy: type-guard
Validate before calling
static final Set<String> SUFFIXES = Stream.of(ConfigDataType.values()).flatMap(t -> Arrays.stream(t.getSuffix())).collect(Collectors.toSet());
if (!SUFFIXES.contains(extension)) throw new IllegalArgumentException("Unsupported suffix: " + extension); Type guard
boolean isSupportedSuffix(String sfx) {
return Stream.of(ConfigDataType.values()).flatMap(t -> Arrays.stream(t.suffixes())).anyMatch(sfx::equals);
} Try / catch
try { return ConfigProcessor.parserDataId(content, dataId); } catch (IllegalArgumentException e) { throw new ConfigException("Config file must end in .yaml/.yml/.properties: " + dataId, e); } Prevention
- Standardize all seata config files on .properties or .yaml extensions
- Validate file names in CI when packaging distributions
- Beware multi-dot names — only the last segment is used
When it happens
Trigger: ConfigProcessor.parserDataId(...) (or a direct call) with a file name whose extension is not '.yaml', '.yml', or '.properties' — e.g. 'file.conf', 'application.json', 'config.txt', or a name with no dot at all.
Common situations: Migrating legacy Seata 'file.conf' setups to the new extension-based config, pointing seata.config.name / fileConfig at a .json or .conf file, or a build step renaming config files with unexpected suffixes.
Related errors
- ERR_CONFIG
- Apollo configuration initialized failed,please check the val
- config type can not be null
- file not found
- not support config data type type: %s
AI-assisted analysis of apache/incubator-seata@e01f97c6db (2026-08-14).
Data as JSON: /api/errors/41f89fa6fd3dd9b2.
Report an issue: GitHub.