{"record":{"id":"420b63fc5c88d2ce","repo":"apache/cassandra","slug":"cannot-parse-udt-value-from-s-cannot-parse-a-c","errorCode":null,"errorMessage":"Cannot parse UDT value from \"%s\", cannot parse a CQL identifier at character %d","messagePattern":"Cannot parse UDT value from \"(.+?)\", cannot parse a CQL identifier at character (.+?)","errorType":"exception","errorClass":"InvalidTypeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java","lineNumber":2674,"sourceCode":"                String.format(\n                \"Cannot parse UDT value from \\\"%s\\\", at character %d expecting '{' but got '%c'\",\n                value, idx, value.charAt(idx)));\n\n            idx = ParseUtils.skipSpaces(value, idx);\n\n            if (value.charAt(idx) == '}') return v;\n\n            while (idx < value.length())\n            {\n\n                int n;\n                try\n                {\n                    n = ParseUtils.skipCQLId(value, idx);\n                }\n                catch (IllegalArgumentException e)\n                {\n                    throw new InvalidTypeException(\n                    String.format(\n                    \"Cannot parse UDT value from \\\"%s\\\", cannot parse a CQL identifier at character %d\",\n                    value, idx),\n                    e);\n                }\n                String name = value.substring(idx, n);\n                idx = n;\n\n                if (!definition.contains(name))\n                    throw new InvalidTypeException(\n                    String.format(\"Unknown field %s in value \\\"%s\\\"\", name, value));\n\n                idx = ParseUtils.skipSpaces(value, idx);\n                if (value.charAt(idx++) != ':')\n                    throw new InvalidTypeException(\n                    String.format(\n                    \"Cannot parse UDT value from \\\"%s\\\", at character %d expecting ':' but got '%c'\",\n                    value, idx, value.charAt(idx)));","sourceCodeStart":2656,"sourceCodeEnd":2692,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java#L2656-L2692","documentation":"InvalidTypeException from UDTCodec.parse: ParseUtils.skipCQLId threw IllegalArgumentException — a field name in the UDT literal could not be parsed as a CQL identifier at the reported character position (e.g. starts with a digit or invalid symbol and is unquoted). The parser names the exact index where the identifier parse failed.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2674 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Quote the field name with double quotes if it is not a plain identifier","Fix the character at the reported position (missing comma or stray token)","Match the exact field names declared in the UDT type"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}