Ah, the keyspace for table2 was somehow getting hardcoded to a wrong keyspace.
Wish the error message a little more helpful. On Fri, Mar 24, 2017 at 2:48 PM, S G <sg.online.em...@gmail.com> wrote: > Hi, > > I have a keyspace with two tables. > > I run a different query for each table: > > Table 1: > Select * from table1 where id = ? > > Table 2: > Select * from table2 where id1 = ? and id = ? > > > My code using datastax fires above two queries one after the other. > While it never fails for table 1, it never succeeds for table 2 > And gives an error: > > > com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured > table table2 > at com.datastax.driver.core.Responses$Error.asException( > Responses.java:136) > at com.datastax.driver.core.DefaultResultSetFuture.onSet( > DefaultResultSetFuture.java:179) > at com.datastax.driver.core.RequestHandler.setFinalResult( > RequestHandler.java:177) > at com.datastax.driver.core.RequestHandler.access$2500( > RequestHandler.java:46) > at com.datastax.driver.core.RequestHandler$SpeculativeExecution. > setFinalResult(RequestHandler.java:799) > at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet( > RequestHandler.java:633) > at com.datastax.driver.core.Connection$Dispatcher. > channelRead0(Connection.java:1070) > at com.datastax.driver.core.Connection$Dispatcher. > channelRead0(Connection.java:993) > at io.netty.channel.SimpleChannelInboundHandler.channelRead( > SimpleChannelInboundHandler.java:105) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:342) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:328) > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > AbstractChannelHandlerContext.java:321) > at io.netty.handler.timeout.IdleStateHandler.channelRead( > IdleStateHandler.java:266) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:342) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:328) > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > AbstractChannelHandlerContext.java:321) > at io.netty.handler.codec.MessageToMessageDecoder.channelRead( > MessageToMessageDecoder.java:102) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:342) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:328) > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > AbstractChannelHandlerContext.java:321) > at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead( > ByteToMessageDecoder.java:293) > at io.netty.handler.codec.ByteToMessageDecoder.channelRead( > ByteToMessageDecoder.java:267) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:342) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:328) > at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead( > AbstractChannelHandlerContext.java:321) > at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead( > DefaultChannelPipeline.java:1280) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:342) > at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead( > AbstractChannelHandlerContext.java:328) > at io.netty.channel.DefaultChannelPipeline.fireChannelRead( > DefaultChannelPipeline.java:890) > at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read( > AbstractNioByteChannel.java:131) > at io.netty.channel.nio.NioEventLoop.processSelectedKey( > NioEventLoop.java:564) > at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized( > NioEventLoop.java:505) > at io.netty.channel.nio.NioEventLoop.processSelectedKeys( > NioEventLoop.java:419) > at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:391) > > Any idea what might be wrong? > > I have confirmed that all table-names and columns names are lowercase. > Datastax java version tried : 3.1.2 and 3.1.4 > Cassandra version: 3.10 > > > Thanks > SG > > >