apache/cassandra · error · InvalidTypeException
Cannot parse UDT value from
Error message
Cannot parse UDT value from "%s", invalid CQL value at character %d
What it means
InvalidTypeException from UDTCodec.parse: ParseUtils.skipCQLValue threw IllegalArgumentException while trying to read the field's value token — the text at the reported position is not a well-formed CQL value literal (unterminated string/collection, bad syntax).
Solutions
- Quote strings and format nested collections/UDTs correctly
- Fix unterminated literals at the character position named in the message
- Validate the value syntax against the field's declared type
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2701 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/d9b70986b44d7136.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2701
if (!definition.contains(name))
throw new InvalidTypeException(
String.format("Unknown field %s in value \"%s\"", name, value));
idx = ParseUtils.skipSpaces(value, idx);
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 = ParseUtils.skipSpaces(value, idx);
try
{
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 ','View on GitHub (pinned to 88fd0f6a0e)