apache/seatunnel · error · IllegalArgumentException

HOCON Config parse from %s failed.

Error message

HOCON Config parse from %s failed.

What it means

SeaTunnelDataTypeConvertorUtil.parseRowType wraps the row type string as HOCON ({conf = <str>}) and parses it with Typesafe Config; if that parse fails (malformed field/type syntax), it throws IllegalArgumentException including the payload.

Source

Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/SeaTunnelDataTypeConvertorUtil.java:150

        if (column.startsWith(SqlType.ARRAY.name())) {
            return parseArrayType(field, columnStr);
        }
        if (column.startsWith(SqlType.DECIMAL.name())) {
            return parseDecimalType(columnStr);
        }
        if (column.trim().startsWith("{")) {
            return parseRowType(columnStr);
        }
        throw CommonError.unsupportedDataType("SeaTunnel", columnStr, field);
    }

    private static SeaTunnelDataType<?> parseRowType(String columnStr) {
        String confPayload = "{conf = " + columnStr + "}";
        Config conf;
        try {
            conf = ConfigFactory.parseString(confPayload);
        } catch (RuntimeException e) {
            throw new IllegalArgumentException(
                    String.format("HOCON Config parse from %s failed.", confPayload), e);
        }
        return parseRowType(conf.getObject("conf"));
    }

    private static SeaTunnelDataType<?> parseRowType(ConfigObject conf) {
        String[] fieldNames = new String[conf.size()];
        SeaTunnelDataType<?>[] fieldTypes = new SeaTunnelDataType[conf.size()];
        conf.keySet().toArray(fieldNames);

        for (int idx = 0; idx < fieldNames.length; idx++) {
            String fieldName = fieldNames[idx];
            ConfigValue typeVal = conf.get(fieldName);
            switch (typeVal.valueType()) {
                case STRING:
                    {
                        fieldTypes[idx] =
                                deserializeSeaTunnelDataType(

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Fix the row-type string to valid SeaTunnel type syntax (balanced <>, quotes, commas)
  2. Test the type string with a minimal job/config before full runs
  3. Use supported simple type names and escape problematic characters

Example fix

// before
parseRowType("row<id int, name<str") // malformed
// after
parseRowType("row<id int, name string>")
Defensive patterns

Strategy: validation

Validate before calling

if (columnStr.chars().filter(ch -> ch=='<').count() != columnStr.chars().filter(ch -> ch=='>').count()) throw new IllegalArgumentException("Unbalanced type brackets: " + columnStr);

Try / catch

try { type = SeaTunnelDataTypeConvertorUtil.parseRowType(s); } catch (IllegalArgumentException e) { /* inspect payload in message */ }

Prevention

When it happens

Trigger: Passing a syntactically invalid row-type string like 'map<n,int>' with unbalanced braces/quotes into parseRowType, e.g. while parsing a 'map<STRING,map<...>>' or ROW type expression from config or catalog.

Common situations: Hand-written dataType strings in connector config with typos, unescaped special characters, or nested complex types whose syntax the HOCON parser rejects.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


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