apache/seatunnel · error · java.lang.IllegalArgumentException

Configuration value overflows/underflows the integer type.

Error message

Configuration value %s overflows/underflows the integer type.

What it means

Thrown from ConfigUtil.convertToInt when the raw value is numeric but lies outside the 32-bit signed integer range (e.g. a long like 99999999999). The guard checks a Long operand against Integer.MIN_VALUE/MAX_VALUE and fails; it fires only on genuine magnitude overflow/underflow, not on non-numeric text (that path throws NumberFormatException instead).

Solutions

  1. Reduce the configured value so it fits in a 32-bit signed integer
  2. If the value legitimately exceeds int range, declare the option as Long instead of Integer
  3. Verify units — the author may have written bytes where MB was intended, inflating the magnitude
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigUtil.java:132 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/9b230fa17bda5fa4. Report an issue: GitHub.

Appendix: source

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

        } 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());
    }

    static Long convertToLong(Object o) {
        if (o.getClass() == Long.class) {
            return (Long) o;
        } else if (o.getClass() == Integer.class) {
            return ((Integer) o).longValue();
        }

        return Long.parseLong(o.toString());
    }

View on GitHub (pinned to cf67b549a7)