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

DataStax JIRA | Asif U | 3 years ago
  1. 0

    collector fails after upgrading from 1.39.9 to 1.40.2

    GitHub | 6 months ago | liyichao
    com.datastax.driver.core.exceptions.InvalidQueryException: Partition KEY part service_name cannot be restricted by IN relation (only the last part of the partition key can)
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Not allowed to query with all of partition Keys(cassandra) with Equals

    GitHub | 8 months ago | venkatesh-rudraraju
    java.io.IOException: Exception during preparation of _**SELECT "dtid", "created", "deleted" FROM "metricsdb"."device_counts_by_hour" WHERE token("period") > ? AND token("period") <= ? AND period = 2016033123 ALLOW FILTERING**_: period cannot be restricted by more than one relation if it includes an Equal
  4. 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 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.exceptions.InvalidQueryException.copy()
    2. DataStax Java Driver for Apache Cassandra - Core
      AbstractSession.prepare
      1. com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:35)
      2. com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:256)
      3. com.datastax.driver.core.AbstractSession.prepare(AbstractSession.java:79)
      3 frames
    3. com.pro.emp
      PhotoAlbumList.call
      1. com.pro.emp.dao.PhotoAlbumDAO.getAllAblumnsWithLatest(PhotoAlbumDAO.java:189)
      2. com.pro.emp.servlets.post.PhotoAlbumList.getPhotoAlbums(GetMoreData.java:251)
      3. com.pro.emp.servlets.post.PhotoAlbumList.call(GetMoreData.java:246)
      4. com.pro.emp.servlets.post.PhotoAlbumList.call(GetMoreData.java:1)
      4 frames
    4. Java RT
      FutureTask.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      2. java.util.concurrent.FutureTask.run(Unknown Source)
      2 frames