apache/cassandra · error · InvalidTypeException
Cannot parse UUID value from
Error message
Cannot parse UUID value from "%s"
What it means
InvalidTypeException from (Abstract)UUIDCodec.parse: UUID.fromString threw IllegalArgumentException, meaning the string is not a valid canonical UUID representation (wrong length, bad hyphen placement, or non-hex characters). Null/empty/'NULL' are handled before parsing, so only malformed literals reach the throw.
Solutions
- Use the canonical 8-4-4-4-12 hex form, e.g. 550e8400-e29b-41d4-a716-446655440000
- Check for stray characters, truncation, or missing hyphens in the literal
- For timeuuid columns, generate the value with now()/uuid() instead of hand-writing it
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:1964 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/228a2a394efe8336.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:1964
@Override
public int serializedSize()
{
return 16;
}
@Override
public UUID parse(String value)
{
try
{
return value == null || value.isEmpty() || value.equalsIgnoreCase("NULL")
? null
: UUID.fromString(value);
}
catch (IllegalArgumentException e)
{
throw new InvalidTypeException(
String.format("Cannot parse UUID value from \"%s\"", value), e);
}
}
@Override
public String format(UUID value)
{
if (value == null) return "NULL";
return value.toString();
}
@Override
public ByteBuffer serialize(UUID value, ProtocolVersion protocolVersion)
{
if (value == null) return null;
ByteBuffer bb = ByteBuffer.allocate(16);
bb.putLong(0, value.getMostSignificantBits());
bb.putLong(8, value.getLeastSignificantBits());View on GitHub (pinned to 88fd0f6a0e)