com.datastax.driver.core.exceptions.InvalidQueryException: Invalid null value of TTL

DataStax JIRA | Vinay Chella | 5 months ago
  1. 0

    While using TTLOption.perRow("ttl") option, there could be null's for few rows in input RDD. It would be good idea to replace "null" with defaultOption(0) in this case since underlying javadriver/cql would throw below exception even when there is one row with null Similar issue is applicable for timestamp option also {code:java} com.datastax.driver.core.exceptions.InvalidQueryException: Invalid null value of TTL {code} *More details:* {code:java} case class KeyValueWithTTL(key: Int, group: Long, value: String, ttl: Int) {code} {code:java} val rdd = sc.makeRDD(Seq( KeyValueWithTTL(1, 1L, "value1", 100), KeyValueWithTTL(2, 2L, "value2", 200), KeyValueWithTTL(3, 3L, "value3", 300), KeyValueWithTTL(4, 4L, "value2", null),)) {code} {code:java} rdd.saveToCassandra("test", "tab", writeConf = WriteConf(ttl = TTLOption.perRow("ttl"))) {code} *Stacktrace:* {code:java} com.datastax.driver.core.exceptions.InvalidQueryException: Invalid null value of TTL 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:173) at com.datastax.driver.core.RequestHandler.access$2500(RequestHandler.java:43) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:788) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1012) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:935) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) at java.lang.Thread.run(Thread.java:745) 16/06/30 19:43:07 ERROR QueryExecutor: Failed to execute: com.datastax.spark.connector.writer.RichBoundStatement@6fa69970 com.datastax.driver.core.exceptions.InvalidQueryException: Invalid null value of TTL 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:173) at com.datastax.driver.core.RequestHandler.access$2500(RequestHandler.java:43) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:788) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1012) at com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:935) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:354) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) at java.lang.Thread.run(Thread.java:745) 16/06/30 19:43:07 ERROR QueryExecutor: Failed to execute: com.datastax.spark.connector.writer.RichBoundStatement@62d6eb4b {code}

    DataStax JIRA | 5 months ago | Vinay Chella
    com.datastax.driver.core.exceptions.InvalidQueryException: Invalid null value of TTL
  2. 0

    DSE Graph with Java Driver, how to add edges

    Stack Overflow | 5 months ago | Josef Bauer
    com.datastax.driver.core.exceptions.InvalidQueryException: No such property: parent for class: Script285
  3. 0

    GitHub comment 791#146880351

    GitHub | 1 year ago | xshaka
    com.impetus.kundera.KunderaException: com.datastax.driver.core.exceptions.InvalidQueryException: Undefined name id in where clause ('id = a8999630-6e8d-11e5-b33e-cfd49dcaba3c')
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 519#161507204

    GitHub | 1 year ago | pushpendrachaturvedi
    com.datastax.driver.core.exceptions.InvalidQueryException: Unknown identifier field19
  6. 0

    GitHub comment 48#166027668

    GitHub | 12 months ago | velvia
    com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily gdelt_chunkmap

    6 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

      Invalid null value of TTL

      at com.datastax.driver.core.Responses$Error.asException()
    2. DataStax Java Driver for Apache Cassandra - Core
      Connection$Dispatcher.channelRead0
      1. com.datastax.driver.core.Responses$Error.asException(Responses.java:136)
      2. com.datastax.driver.core.DefaultResultSetFuture.onSet(DefaultResultSetFuture.java:179)
      3. com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:173)
      4. com.datastax.driver.core.RequestHandler.access$2500(RequestHandler.java:43)
      5. com.datastax.driver.core.RequestHandler$SpeculativeExecution.setFinalResult(RequestHandler.java:788)
      6. com.datastax.driver.core.RequestHandler$SpeculativeExecution.onSet(RequestHandler.java:607)
      7. com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:1012)
      8. com.datastax.driver.core.Connection$Dispatcher.channelRead0(Connection.java:935)
      8 frames
    3. Netty
      SingleThreadEventExecutor$2.run
      1. io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
      2. io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
      3. io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
      4. io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)
      5. io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
      6. io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
      7. io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
      8. io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
      9. io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
      10. io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276)
      11. io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263)
      12. io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
      13. io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
      14. io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
      15. io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
      16. io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
      17. io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
      18. io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
      19. io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
      20. io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
      20 frames
    4. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame