{"record":{"id":"4f6705ad6597f412","repo":"apache/cassandra","slug":"cannot-parse-udt-value-from-s-at-character-d-4f6705","errorCode":null,"errorMessage":"Cannot parse UDT value from \"%s\", at character %d expecting ',' but got '%c'","messagePattern":"Cannot parse UDT value from \"(.+?)\", at character (.+?) expecting ',' but got '%c'","errorType":"exception","errorClass":"InvalidTypeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java","lineNumber":2715,"sourceCode":"                    n = ParseUtils.skipCQLValue(value, idx);\n                }\n                catch (IllegalArgumentException e)\n                {\n                    throw new InvalidTypeException(\n                    String.format(\n                    \"Cannot parse UDT value from \\\"%s\\\", invalid CQL value at character %d\",\n                    value, idx),\n                    e);\n                }\n\n                String input = value.substring(idx, n);\n                v = parseAndSetField(input, v, name);\n                idx = n;\n\n                idx = ParseUtils.skipSpaces(value, idx);\n                if (value.charAt(idx) == '}') return v;\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)));\n                ++idx; // skip ','\n\n                idx = ParseUtils.skipSpaces(value, idx);\n            }\n            throw new InvalidTypeException(\n            String.format(\"Malformed UDT value \\\"%s\\\", missing closing '}'\", value));\n        }\n\n        /**\n         * Return a new instance of {@code T}.\n         *\n         * @return A new instance of {@code T}.\n         */\n        protected abstract T newInstance();\n","sourceCodeStart":2697,"sourceCodeEnd":2733,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java#L2697-L2733","documentation":"InvalidTypeException from UDTCodec.parse: after a field's value, the next character is neither '}' (end of the UDT) nor ',' (next field). The parser requires one of those two separators between field entries; any other character is reported with its position.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2715 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Separate field entries with ',' and terminate the literal with '}'","Remove the stray character at the reported position","Check for duplicated or missing separators after pasting/editing the literal"],"exampleFix":null,"handlingStrategy":"validation","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"}