apache/cassandra · error · InvalidTypeException
Cannot parse UDT value from
Error message
Cannot parse UDT value from "%s", at character %d expecting ',' but got '%c'
What it means
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.
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2715 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/4f6705ad6597f412.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2715
n = ParseUtils.skipCQLValue(value, idx);
}
catch (IllegalArgumentException e)
{
throw new InvalidTypeException(
String.format(
"Cannot parse UDT value from \"%s\", invalid CQL value at character %d",
value, idx),
e);
}
String input = value.substring(idx, n);
v = parseAndSetField(input, v, name);
idx = n;
idx = ParseUtils.skipSpaces(value, idx);
if (value.charAt(idx) == '}') return v;
if (value.charAt(idx) != ',')
throw new InvalidTypeException(
String.format(
"Cannot parse UDT value from \"%s\", at character %d expecting ',' but got '%c'",
value, idx, value.charAt(idx)));
++idx; // skip ','
idx = ParseUtils.skipSpaces(value, idx);
}
throw new InvalidTypeException(
String.format("Malformed UDT value \"%s\", missing closing '}'", value));
}
/**
* Return a new instance of {@code T}.
*
* @return A new instance of {@code T}.
*/
protected abstract T newInstance();
View on GitHub (pinned to 88fd0f6a0e)