Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-13949

java.lang.ArrayIndexOutOfBoundsException while executing query

    XMLWordPrintableJSON

    Details

    • Bug Category:
      Correctness - API / Semantic Implementation
    • Severity:
      Normal

      Description

      While executing a query on a table contaninig a field with a (escaped) json, the following exception occurs:

      java.lang.ArrayIndexOutOfBoundsException: null
      at org.codehaus.jackson.io.JsonStringEncoder.quoteAsString(JsonStringEncoder.java:141) ~[jackson-core-asl-1.9.2.jar:1.9.2]
      at org.apache.cassandra.cql3.Json.quoteAsJsonString(Json.java:45) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.db.marshal.UTF8Type.toJSONString(UTF8Type.java:66) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.selection.Selection.rowToJson(Selection.java:291) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.getOutputRow(Selection.java:431) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.build(Selection.java:417) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:763) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:400) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:378) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:251) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:79) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:217) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:248) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:233) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:116) ~[apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:517) [apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:410) [apache-cassandra-3.11.0.jar:3.11.0]
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.44.Final.jar:4.0.44.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:357) [netty-all-4.0.44.Final.jar:4.0.44.Final]
      at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:35) [netty-all-4.0.44.Final.jar:4.0.44.Final]
      at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:348) [netty-all-4.0.44.Final.jar:4.0.44.Final]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_131]
      at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) [apache-cassandra-3.11.0.jar:3.11.0]
      at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [apache-cassandra-3.11.0.jar:3.11.0]
      at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]

      Find attached the schema of the table, the insertion query with the data provoking the failure, and the failing query.

        Attachments

        1. 13949.png
          231 kB
          Jason Brown
        2. schema.cql
          1.0 kB
          Luis E Rodriguez Pupo
        3. query.cql
          0.4 kB
          Luis E Rodriguez Pupo
        4. insert.cql
          785 kB
          Luis E Rodriguez Pupo

          Activity

            People

            • Assignee:
              jasobrown Jason Brown
              Reporter:
              lrodriguez2002cu Luis E Rodriguez Pupo
              Authors:
              Jason Brown
              Reviewers:
              Jeff Jirsa
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: