apache/seatunnel · error · java.lang.IllegalArgumentException

Unsupported type:

Error message

Unsupported type: 

What it means

Thrown from ConfigUtil.convertValue as the terminal fall-through of its if/else type dispatch: the option's declared Class is not one of the supported types (primitive wrappers, String, Boolean, enum, Duration, Object, etc.). At its throw site it means a plugin declared an Option with a type ConfigUtil cannot convert raw config text into — a programming/configuration-schema error rather than a bad user value.

Solutions

  1. Change the Option to one of the supported types (Boolean, Integer, Long, Float, Double, String, enum, Duration, Map, List, Object)
  2. If a custom type is required, deserialize as Object or a supported container and convert in the plugin's own code
  3. Check the option type declaration against ConfigUtil.convertValue's supported branches
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigUtil.java:121 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/00eb0d5ed7d94ff9. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigUtil.java:121

            return (T) convertToBoolean(rawValue);
        } else if (clazz.isEnum()) {
            return (T) convertToEnum(rawValue, (Class<? extends Enum<?>>) clazz);
        } else if (String.class.equals(clazz)) {
            return (T) convertToJsonString(rawValue);
        } else if (Integer.class.equals(clazz)) {
            return (T) convertToInt(rawValue);
        } else if (Long.class.equals(clazz)) {
            return (T) convertToLong(rawValue);
        } else if (Float.class.equals(clazz)) {
            return (T) convertToFloat(rawValue);
        } else if (Double.class.equals(clazz)) {
            return (T) convertToDouble(rawValue);
        } else if (Duration.class.equals(clazz)) {
            return (T) convertToDuration(rawValue);
        } else if (Object.class.equals(clazz)) {
            return (T) rawValue;
        }
        throw new IllegalArgumentException("Unsupported type: " + clazz);
    }

    static Integer convertToInt(Object o) {
        if (o.getClass() == Integer.class) {
            return (Integer) o;
        } else if (o.getClass() == Long.class) {
            long value = (Long) o;
            if (value <= Integer.MAX_VALUE && value >= Integer.MIN_VALUE) {
                return (int) value;
            } else {
                throw new IllegalArgumentException(
                        String.format(
                                "Configuration value %s overflows/underflows the integer type.",
                                value));
            }
        }

        return Integer.parseInt(o.toString());

View on GitHub (pinned to cf67b549a7)