{"record":{"id":"2a2c580492cf72f6","repo":"apache/seatunnel","slug":"hocon-config-parse-from-s-failed","errorCode":null,"errorMessage":"HOCON Config parse from %s failed.","messagePattern":"HOCON Config parse from (.+?) failed\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/SeaTunnelDataTypeConvertorUtil.java","lineNumber":150,"sourceCode":"        if (column.startsWith(SqlType.ARRAY.name())) {\n            return parseArrayType(field, columnStr);\n        }\n        if (column.startsWith(SqlType.DECIMAL.name())) {\n            return parseDecimalType(columnStr);\n        }\n        if (column.trim().startsWith(\"{\")) {\n            return parseRowType(columnStr);\n        }\n        throw CommonError.unsupportedDataType(\"SeaTunnel\", columnStr, field);\n    }\n\n    private static SeaTunnelDataType<?> parseRowType(String columnStr) {\n        String confPayload = \"{conf = \" + columnStr + \"}\";\n        Config conf;\n        try {\n            conf = ConfigFactory.parseString(confPayload);\n        } catch (RuntimeException e) {\n            throw new IllegalArgumentException(\n                    String.format(\"HOCON Config parse from %s failed.\", confPayload), e);\n        }\n        return parseRowType(conf.getObject(\"conf\"));\n    }\n\n    private static SeaTunnelDataType<?> parseRowType(ConfigObject conf) {\n        String[] fieldNames = new String[conf.size()];\n        SeaTunnelDataType<?>[] fieldTypes = new SeaTunnelDataType[conf.size()];\n        conf.keySet().toArray(fieldNames);\n\n        for (int idx = 0; idx < fieldNames.length; idx++) {\n            String fieldName = fieldNames[idx];\n            ConfigValue typeVal = conf.get(fieldName);\n            switch (typeVal.valueType()) {\n                case STRING:\n                    {\n                        fieldTypes[idx] =\n                                deserializeSeaTunnelDataType(","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/SeaTunnelDataTypeConvertorUtil.java#L132-L168","documentation":"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.","triggerScenarios":"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.","commonSituations":"Hand-written dataType strings in connector config with typos, unescaped special characters, or nested complex types whose syntax the HOCON parser rejects.","solutions":["Fix the row-type string to valid SeaTunnel type syntax (balanced <>, quotes, commas)","Test the type string with a minimal job/config before full runs","Use supported simple type names and escape problematic characters"],"exampleFix":"// before\nparseRowType(\"row<id int, name<str\") // malformed\n// after\nparseRowType(\"row<id int, name string>\")","handlingStrategy":"validation","validationCode":"if (columnStr.chars().filter(ch -> ch=='<').count() != columnStr.chars().filter(ch -> ch=='>').count()) throw new IllegalArgumentException(\"Unbalanced type brackets: \" + columnStr);","typeGuard":null,"tryCatchPattern":"try { type = SeaTunnelDataTypeConvertorUtil.parseRowType(s); } catch (IllegalArgumentException e) { /* inspect payload in message */ }","preventionTips":["Validate type strings for balanced brackets/quotes","Use documented SeaTunnel type names only","Unit-test complex type strings before production"],"tags":["datatype","parsing","hocon"],"backgroundTag":"invalid-argument-format","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}