apache/cassandra · error · InvalidTypeException
Cannot parse UDT value from
Error message
Cannot parse UDT value from "%s", cannot parse a CQL identifier at character %d
What it means
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.
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2674 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/420b63fc5c88d2ce.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:2674
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);
if (value.charAt(idx) == '}') return v;
while (idx < value.length())
{
int n;
try
{
n = ParseUtils.skipCQLId(value, idx);
}
catch (IllegalArgumentException e)
{
throw new InvalidTypeException(
String.format(
"Cannot parse UDT value from \"%s\", cannot parse a CQL identifier at character %d",
value, idx),
e);
}
String name = value.substring(idx, n);
idx = n;
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)));View on GitHub (pinned to 88fd0f6a0e)