apache/cassandra · error · InvalidRequestException

e.getMessage()

Error message

e.getMessage()

What it means

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.

Solutions

  1. Fix the bound variable value so it matches the column type declared in the schema, then retry the query
  2. Check the CQL literal/serialized value being bound against receiver.type (e.g. use the correct serializer for the type)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/java/org/apache/cassandra/cql3/terms/Marker.java:94 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/4c3f1d80ae3f8089. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/cql3/terms/Marker.java:94

    {
        try
        {
            ByteBuffer bytes = context.options().getValues().get(bindIndex);
            if (bytes == null)
                return null;

            if (bytes == ByteBufferUtil.UNSET_BYTE_BUFFER)
                return Constants.UNSET_VALUE;

            if (receiver.type instanceof MultiElementType<?>)
                return MultiElements.Value.fromSerialized(bytes, (MultiElementType<?>) receiver.type);

            receiver.type.validate(bytes);
            return new Constants.Value(bytes);
        }
        catch (MarshalException e)
        {
            throw new InvalidRequestException(e.getMessage(), e);
        }
    }

    // an optimized version without allocating interim Terminal objects
    @Override
    public ByteBuffer bindAndGet(FunctionContext context)
    {
        try
        {
            ByteBuffer bytes = context.options().getValue(bindIndex);
            if (bytes == null)
                return null;

            if (bytes == ByteBufferUtil.UNSET_BYTE_BUFFER)
                return ByteBufferUtil.UNSET_BYTE_BUFFER;

            if (receiver.type instanceof MultiElementType<?>)
            {

View on GitHub (pinned to 88fd0f6a0e)