{"record":{"id":"41f89fa6fd3dd9b2","repo":"apache/incubator-seata","slug":"not-support-config-data-type-suffix-s","errorCode":null,"errorMessage":"not support config data type suffix: %s","messagePattern":"not support config data type suffix: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"config/seata-config-core/src/main/java/org/apache/seata/config/processor/ConfigDataType.java","lineNumber":71,"sourceCode":"        }\n        throw new IllegalArgumentException(\"not support config data type type: \" + name);\n    }\n\n    /**\n     * Gets type by suffix.\n     *\n     * @param suffix the suffix\n     * @return the type\n     */\n    public static ConfigDataType getTypeBySuffix(String suffix) {\n        for (ConfigDataType configDataType : values()) {\n            for (String sfx : configDataType.suffix) {\n                if (sfx.equals(suffix)) {\n                    return configDataType;\n                }\n            }\n        }\n        throw new IllegalArgumentException(\"not support config data type suffix: \" + suffix);\n    }\n}\n","sourceCodeStart":53,"sourceCodeEnd":74,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/config/seata-config-core/src/main/java/org/apache/seata/config/processor/ConfigDataType.java#L53-L74","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nString dataId = \"seata-server.conf\";\nprocessor.parserDataId(content, dataId); // suffix 'conf' -> throws\n\n// after\nString dataId = \"seata-server.properties\";\nprocessor.parserDataId(content, dataId); // ok","handlingStrategy":"type-guard","validationCode":"static final Set<String> SUFFIXES = Stream.of(ConfigDataType.values()).flatMap(t -> Arrays.stream(t.getSuffix())).collect(Collectors.toSet());\nif (!SUFFIXES.contains(extension)) throw new IllegalArgumentException(\"Unsupported suffix: \" + extension);","typeGuard":"boolean isSupportedSuffix(String sfx) {\n    return Stream.of(ConfigDataType.values()).flatMap(t -> Arrays.stream(t.suffixes())).anyMatch(sfx::equals);\n}","tryCatchPattern":"try { return ConfigProcessor.parserDataId(content, dataId); } catch (IllegalArgumentException e) { throw new ConfigException(\"Config file must end in .yaml/.yml/.properties: \" + dataId, e); }","preventionTips":["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"],"tags":["config","seata","file-extension","startup"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}