Details
-
Improvement
-
Status: Resolved
-
Low
-
Resolution: Duplicate
-
None
-
None
-
None
-
Cassandra 2.0.3
Java Driver Core 2.0.0-rc2
Description
When sending requests with EACH_QUORUM consistency and SimpleStrategy, the Java driver reports the following exception:
ERROR [11:38:36,075][] org.apache.cassandra.transport.messages.ErrorMessage@:fromException Unexpected exception during request java.lang.ClassCastException: org.apache.cassandra.locator.SimpleStrategy cannot be cast to org.apache.cassandra.locator.NetworkTopologyStrategy at org.apache.cassandra.service.DatacenterSyncWriteResponseHandler.<init>(DatacenterSyncWriteResponseHandler.java:55) at org.apache.cassandra.locator.AbstractReplicationStrategy.getWriteResponseHandler(AbstractReplicationStrategy.java:132) at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:731) at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:508) at org.apache.cassandra.service.StorageProxy.mutateWithTriggers(StorageProxy.java:578) at org.apache.cassandra.cql3.statements.BatchStatement.execute(BatchStatement.java:171) at org.apache.cassandra.cql3.statements.BatchStatement.executeWithPerStatementVariables(BatchStatement.java:165) at org.apache.cassandra.cql3.QueryProcessor.processBatch(QueryProcessor.java:369) at org.apache.cassandra.transport.messages.BatchMessage.execute(BatchMessage.java:207) at org.apache.cassandra.transport.Message$Dispatcher.messageReceived(Message.java:304) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)
There should be proper error message instead of a ClassCastException. This is a minor issue though.
Attachments
Issue Links
- duplicates
-
CASSANDRA-10584 reads with EACH_QUORUM on keyspace with SimpleTopologyStrategy throw a ClassCastException
- Resolved