{"record":{"id":"4c3f1d80ae3f8089","repo":"apache/cassandra","slug":"e-getmessage-4c3f1d","errorCode":null,"errorMessage":"e.getMessage()","messagePattern":"e\\.getMessage\\(\\)","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/cql3/terms/Marker.java","lineNumber":94,"sourceCode":"    {\n        try\n        {\n            ByteBuffer bytes = context.options().getValues().get(bindIndex);\n            if (bytes == null)\n                return null;\n\n            if (bytes == ByteBufferUtil.UNSET_BYTE_BUFFER)\n                return Constants.UNSET_VALUE;\n\n            if (receiver.type instanceof MultiElementType<?>)\n                return MultiElements.Value.fromSerialized(bytes, (MultiElementType<?>) receiver.type);\n\n            receiver.type.validate(bytes);\n            return new Constants.Value(bytes);\n        }\n        catch (MarshalException e)\n        {\n            throw new InvalidRequestException(e.getMessage(), e);\n        }\n    }\n\n    // an optimized version without allocating interim Terminal objects\n    @Override\n    public ByteBuffer bindAndGet(FunctionContext context)\n    {\n        try\n        {\n            ByteBuffer bytes = context.options().getValue(bindIndex);\n            if (bytes == null)\n                return null;\n\n            if (bytes == ByteBufferUtil.UNSET_BYTE_BUFFER)\n                return ByteBufferUtil.UNSET_BYTE_BUFFER;\n\n            if (receiver.type instanceof MultiElementType<?>)\n            {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/cql3/terms/Marker.java#L76-L112","documentation":"In Marker.bind, a bound-variable value for the receiver failed AbstractType.validate (MarshalException): the serialized bytes supplied for the bind marker do not conform to the column's type. The MarshalException is rethrown wrapped as an InvalidRequestException whose message is e.getMessage(), so the driver sees the low-level validation failure text.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/cql3/terms/Marker.java:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the bound variable value so it matches the column type declared in the schema, then retry the query","Check the CQL literal/serialized value being bound against receiver.type (e.g. use the correct serializer for the type)"],"exampleFix":null,"handlingStrategy":"validation","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"}