apache/incubator-seata · error · IllegalArgumentException

not support config type:

Error message

not support config type: 

What it means

ConfigType.getType(name) throws IllegalArgumentException('not support config type: ' + name) when the supplied name matches none of the enum constants (file, nacos, apollo, etcd3, zk, consul, custom) case-insensitively. It is the parser for config.type / registry.type values, so an unrecognized string means seata cannot select a Configuration implementation.

Source

Thrown at config/seata-config-core/src/main/java/org/apache/seata/config/ConfigType.java:69

    SpringCloudConfig,
    /**
     * Custom config type
     */
    Custom;

    /**
     * Gets type.
     *
     * @param name the name
     * @return the type
     */
    public static ConfigType getType(String name) {
        for (ConfigType configType : values()) {
            if (configType.name().equalsIgnoreCase(name)) {
                return configType;
            }
        }
        throw new IllegalArgumentException("not support config type: " + name);
    }
}

View on GitHub (pinned to e01f97c6db)

Solutions

  1. Correct config.type (and registry.type if applicable) to one of: file, nacos, apollo, etcd3, zk, consul, custom — lowercase or any case works.
  2. Check for whitespace/quotes/BOM around the value in the config file.
  3. If you intended a custom provider, register it via SPI (Configuration ext) and use type 'custom'.
  4. Ensure the matching seata-config-* dependency jar is on the classpath for that type.

Example fix

# before
config { type = "nacos2" }

# after
config { type = "nacos" }
Defensive patterns

Strategy: validation

Validate before calling

Set<String> supported = Set.of("file","nacos","apollo","etcd3","zk","consul","custom");
String t = configType == null ? "" : configType.trim().toLowerCase(Locale.ROOT);
if (!supported.contains(t)) {
    throw new IllegalArgumentException("unsupported config type: " + configType);
}

Prevention

When it happens

Trigger: config.type set to a typo ('naco', 'Apolo', 'redis'), a type whose module isn't on the classpath, or a valid name with stray whitespace/quotes; programmatic calls like ConfigType.getType(someUserInput).

Common situations: Hand-edited registry.conf/file.conf or -Dproperty typos; YAML configs where quoting introduces hidden characters; docs/tutorials referencing a config backend not supported by the seata version in use.

Related errors


AI-assisted analysis of apache/incubator-seata@e01f97c6db (2026-08-14). Data as JSON: /api/errors/d4f5be3637e7d405. Report an issue: GitHub.