{"record":{"id":"228a2a394efe8336","repo":"apache/cassandra","slug":"cannot-parse-uuid-value-from-s","errorCode":null,"errorMessage":"Cannot parse UUID value from \"%s\"","messagePattern":"Cannot parse UUID value from \"(.+?)\"","errorType":"exception","errorClass":"InvalidTypeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java","lineNumber":1964,"sourceCode":"\n        @Override\n        public int serializedSize()\n        {\n            return 16;\n        }\n\n        @Override\n        public UUID parse(String value)\n        {\n            try\n            {\n                return value == null || value.isEmpty() || value.equalsIgnoreCase(\"NULL\")\n                       ? null\n                       : UUID.fromString(value);\n            }\n            catch (IllegalArgumentException e)\n            {\n                throw new InvalidTypeException(\n                String.format(\"Cannot parse UUID value from \\\"%s\\\"\", value), e);\n            }\n        }\n\n        @Override\n        public String format(UUID value)\n        {\n            if (value == null) return \"NULL\";\n            return value.toString();\n        }\n\n        @Override\n        public ByteBuffer serialize(UUID value, ProtocolVersion protocolVersion)\n        {\n            if (value == null) return null;\n            ByteBuffer bb = ByteBuffer.allocate(16);\n            bb.putLong(0, value.getMostSignificantBits());\n            bb.putLong(8, value.getLeastSignificantBits());","sourceCodeStart":1946,"sourceCodeEnd":1982,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java#L1946-L1982","documentation":"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.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/cql3/functions/types/TypeCodec.java:1964 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"try-catch","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"}