{"record":{"id":"a4c4625749334cdc","repo":"apache/cassandra","slug":"malformed-udt-value-s-missing-closing","errorCode":null,"errorMessage":"Malformed UDT value \"%s\", missing closing '}'","messagePattern":"Malformed UDT value \"(.+?)\", missing closing '\\}'","errorType":"exception","errorClass":"InvalidTypeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java","lineNumber":2723,"sourceCode":"                    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\n        /**\n         * Serialize an individual field in an object, as part of serializing the whole object to a CQL\n         * UDT (see {@link #serialize(Object, ProtocolVersion)}).\n         *\n         * @param source          The object to read the field from.\n         * @param fieldName       The name of the field. Note that if it is case-sensitive or contains special\n         *                        characters, it will be double-quoted (i.e. the string will contain actual quote\n         *                        characters, as in {@code \"\\\"foobar\\\"\"}).","sourceCodeStart":2705,"sourceCodeEnd":2741,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java#L2705-L2741","documentation":"InvalidTypeException from UDTCodec.parse: parsing consumed the input (or hit a non-separator) without finding the closing '}' of the UDT literal — the loop over fields ended with input remaining but no brace, i.e. the literal is unterminated or truncated.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2723 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Append the closing '}' to complete the UDT literal","Re-check that nested braces are balanced","Re-copy the full literal if it was truncated in transit"],"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"}