com.datastax.driver.core.exceptions.InvalidQueryException: no keyspace has been specified

DataStax JIRA | Antonio Barbuzzi | 2 years ago
  1. 0

    When uploading a large dataset in Cassandra, I got a an _InvalidQueryException: no keyspace has been specified_. The exception seems to be related to a timeout on _Connection#setKeyspace_, which is ignored. To my understanding, the query is issued using a connection for which the keyspace has not been set, and the query fails, returning an _InvalidQueryException_. This is the service log: {code} 2014-08-14 10:51:33,865 WARN [Worker-0] com.datastax.driver.core.Connection - Timeout while setting keyspace on connection to cassandra-04.prod.visualdna.com/10.200.40.64:9042. This should not happen but is not critical (it will retried) 2014-08-14 10:51:34,379 WARN [Worker-0] com.datastax.driver.core.Connection - Timeout while setting keyspace on connection to cassandra-04.prod.visualdna.com/10.200.40.64:9042. This should not happen but is not critical (it will retried) 2014-08-14 10:51:34,889 WARN [Worker-0] com.datastax.driver.core.Connection - Timeout while setting keyspace on connection to cassandra-04.prod.visualdna.com/10.200.40.64:9042. This should not happen but is not critical (it will retried) 2014-08-14 10:51:35,405 WARN [Worker-0] com.datastax.driver.core.Connection - Timeout while setting keyspace on connection to cassandra-04.prod.visualdna.com/10.200.40.64:9042. This should not happen but is not critical (it will retried) com.datastax.driver.core.exceptions.InvalidQueryException: no keyspace has been specified at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:35) at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:172) at net.imagini.common.dao.cassandra.datastax.DatastaxCassandraDataAccess$AsyncOperationExecutor.tryGetFuture(DatastaxCassandraDataAccess.java:802) at net.imagini.common.dao.cassandra.datastax.DatastaxCassandraDataAccess$AsyncOperationExecutor.join(DatastaxCassandraDataAccess.java:784) at net.imagini.common.dao.cassandra.datastax.DatastaxCassandraDataAccess.executeBatchMutation(DatastaxCassandraDataAccess.java:267) at net.imagini.common.dao.cassandra.datastax.DatastaxCassandraDataAccess.executeMutation(DatastaxCassandraDataAccess.java:291) at net.imagini.sprinkler.workers.BaseCassandraWorker.commit(BaseCassandraWorker.java:146) at net.imagini.sprinkler.workers.BaseCassandraWorker.throttledCommit(BaseCassandraWorker.java:132) at net.imagini.sprinkler.workers.BaseCassandraWorker.processQueue(BaseCassandraWorker.java:93) at net.imagini.sprinkler.workers.BaseCassandraWorker.run(BaseCassandraWorker.java:58) 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:744) Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: no keyspace has been specified at com.datastax.driver.core.Responses$Error.asException(Responses.java:97) at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:108) at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235) at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:367) at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:571) 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.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.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.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.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.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) 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.sendUpstream(DefaultChannelPipeline.java:559) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ... 3 more {code}

    DataStax JIRA | 2 years ago | Antonio Barbuzzi
    com.datastax.driver.core.exceptions.InvalidQueryException: no keyspace has been specified
  2. 0

    When uploading a large dataset in Cassandra, I got a an _InvalidQueryException: no keyspace has been specified_. The exception seems to be related to a timeout on _Connection#setKeyspace_, which is ignored. To my understanding, the query is issued using a connection for which the keyspace has not been set, and the query fails, returning an _InvalidQueryException_. This is the service log: {code} 2014-08-14 10:51:33,865 WARN [Worker-0] com.datastax.driver.core.Connection - Timeout while setting keyspace on connection to cassandra-04.prod.visualdna.com/10.200.40.64:9042. This should not happen but is not critical (it will retried) 2014-08-14 10:51:34,379 WARN [Worker-0] com.datastax.driver.core.Connection - Timeout while setting keyspace on connection to cassandra-04.prod.visualdna.com/10.200.40.64:9042. This should not happen but is not critical (it will retried) 2014-08-14 10:51:34,889 WARN [Worker-0] com.datastax.driver.core.Connection - Timeout while setting keyspace on connection to cassandra-04.prod.visualdna.com/10.200.40.64:9042. This should not happen but is not critical (it will retried) 2014-08-14 10:51:35,405 WARN [Worker-0] com.datastax.driver.core.Connection - Timeout while setting keyspace on connection to cassandra-04.prod.visualdna.com/10.200.40.64:9042. This should not happen but is not critical (it will retried) com.datastax.driver.core.exceptions.InvalidQueryException: no keyspace has been specified at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:35) at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:172) at net.imagini.common.dao.cassandra.datastax.DatastaxCassandraDataAccess$AsyncOperationExecutor.tryGetFuture(DatastaxCassandraDataAccess.java:802) at net.imagini.common.dao.cassandra.datastax.DatastaxCassandraDataAccess$AsyncOperationExecutor.join(DatastaxCassandraDataAccess.java:784) at net.imagini.common.dao.cassandra.datastax.DatastaxCassandraDataAccess.executeBatchMutation(DatastaxCassandraDataAccess.java:267) at net.imagini.common.dao.cassandra.datastax.DatastaxCassandraDataAccess.executeMutation(DatastaxCassandraDataAccess.java:291) at net.imagini.sprinkler.workers.BaseCassandraWorker.commit(BaseCassandraWorker.java:146) at net.imagini.sprinkler.workers.BaseCassandraWorker.throttledCommit(BaseCassandraWorker.java:132) at net.imagini.sprinkler.workers.BaseCassandraWorker.processQueue(BaseCassandraWorker.java:93) at net.imagini.sprinkler.workers.BaseCassandraWorker.run(BaseCassandraWorker.java:58) 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:744) Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: no keyspace has been specified at com.datastax.driver.core.Responses$Error.asException(Responses.java:97) at com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:108) at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235) at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:367) at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:571) 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.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.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.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.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.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) 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.sendUpstream(DefaultChannelPipeline.java:559) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ... 3 more {code}

    DataStax JIRA | 2 years ago | Antonio Barbuzzi
    com.datastax.driver.core.exceptions.InvalidQueryException: no keyspace has been specified
  3. 0

    start topology without initialized cassandra

    GitHub | 3 years ago | kfleischmann
    com.datastax.driver.core.exceptions.InvalidQueryException: Keyspace citstorm does not exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 24#41381453

    GitHub | 3 years ago | adnane-
    com.datastax.driver.core.exceptions.InvalidQueryException: Cannot page queries with both ORDER BY and a IN restriction on the partition key; you must either remove the ORDER BY or the IN and sort client side, or disable paging for this query>}
  6. 0

    GitHub comment 12#38660622

    GitHub | 3 years ago | neilprosser
    com.datastax.driver.core.exceptions.InvalidQueryException: LIMIT must be strictly positive

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.datastax.driver.core.exceptions.InvalidQueryException

      no keyspace has been specified

      at com.datastax.driver.core.Responses$Error.asException()
    2. DataStax Java Driver for Apache Cassandra - Core
      Connection$Dispatcher.messageReceived
      1. com.datastax.driver.core.Responses$Error.asException(Responses.java:97)
      2. com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:108)
      3. com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:235)
      4. com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:367)
      5. com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:571)
      5 frames
    3. Netty
      DeadLockProofWorker$1.run
      1. org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
      2. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      3. org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
      4. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
      5. org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
      6. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      7. org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
      8. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
      9. org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
      10. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      11. org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
      12. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
      13. org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
      14. org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
      15. org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
      16. org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
      17. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      18. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
      19. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
      20. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
      21. org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
      22. org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
      23. org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
      24. org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
      25. org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
      26. org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
      27. org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
      27 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:744)
      3 frames