"ServerError: java.lang.IllegalArgumentException: null" when querying a table in Cassandra?

Author: Brian Johnson

I'm receiving an error "ServerError: java.lang.IllegalArgumentException: null" whenever I query anything in a particular table.

Example Queries I've tried:

select * from audit;
select * from audit limit 2;
select SPECIFIC_COLUMN from audit WHERE ID = '123456' ALLOW FILTERING;

The data is present:

nodetool cfstats -- keyspace_name.audit
Total number of tables: 55
----------------
Keyspace : keyspace_name
    Read Count: 0
    Read Latency: NaN ms
    Write Count: 0
    Write Latency: NaN ms
    Pending Flushes: 0
        Table: audit
        SSTable count: 2
        Space used (live): 99745
        Space used (total): 99745
        Space used by snapshots (total): 0
        Off heap memory used (total): 1456
        SSTable Compression Ratio: 0.2623552456457625
        Number of partitions (estimate): 900
        Memtable cell count: 0
        Memtable data size: 0
        Memtable off heap memory used: 0
        Memtable switch count: 0
        Local read count: 0
        Local read latency: NaN ms
        Local write count: 0
        Local write latency: NaN ms
        Pending flushes: 0
        Percent repaired: 100.0
        Bloom filter false positives: 0
        Bloom filter false ratio: 0.00000
        Bloom filter space used: 1160

Nothing gleamingly obvious from dump with sstabledump:

sstabledump /opt/company/data/cassandra/data/keyspace_name/audit-501e5910887811e98345e1aa09bd5db5/mc-1-big-Data.db > test_dump

From while running the query:

/opt/company/data/cassandra/logs/system.log

ERROR [Native-Transport-Requests-1] 2019-08-13 00:34:49,708 ErrorMessage.java:384 - Unexpected exception during request
java.lang.IllegalArgumentException: null
    at java.nio.Buffer.limit(Buffer.java:275) ~[na:1.8.0_162]
    at org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:620) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.utils.ByteBufferUtil.readBytesWithShortLength(ByteBufferUtil.java:629) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.db.marshal.CompositeType.split(CompositeType.java:188) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.statements.SelectStatement.getComponents(SelectStatement.java:809) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.statements.SelectStatement.processPartition(SelectStatement.java:829) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:791) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:439) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:417) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:290) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:118) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:224) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:255) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:240) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116) ~[apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517) [apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410) [apache-cassandra-3.11.2.jar:3.11.2]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.44.Final.jar:4.0.44.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:357) [netty-all-4.0.44.Final.jar:4.0.44.Final]
    at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35) [netty-all-4.0.44.Final.jar:4.0.44.Final]
    at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:348) [netty-all-4.0.44.Final.jar:4.0.44.Final]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_162]
    at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) [apache-cassandra-3.11.2.jar:3.11.2]
    at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [apache-cassandra-3.11.2.jar:3.11.2]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_162]

nothing present in /var/log/messages.

nothing present in start up for /var/log/cassandra/cassandra.log.

nodetool repair, nodetool repair --trace entpor_access audit (no issues in the repair, it completes successfully, restarting the nodes, it's present across all of the replicas, no backups available and unsure how to recover.

Originally Sourced from: https://stackoverflow.com/questions/57471133/servererror-java-lang-illegalargumentexception-when-querying-a-table-in-cassa