java.lang.IllegalArgumentException: Not a JSON map: null

DataStax JIRA | Andy Tolbert | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    With the change for [JAVA-732] index metadata is now parsed for more than just CUSTOM types. When index_options for an index is null, it is actually a 'null' string instead of a null reference which causes problems in the parsing and yields the following error on connection: {noformat} 687 [main] ERROR com.datastax.driver.core.Metadata - Error parsing schema for table <ks>.<table>: Cluster.getMetadata().getKeyspace(<ks>).getTable(<table>) will be missing or incomplete java.lang.IllegalArgumentException: Not a JSON map: null at com.datastax.driver.core.SimpleJSONParser.parseStringMap(SimpleJSONParser.java:77) at com.datastax.driver.core.ColumnMetadata$IndexMetadata.build(ColumnMetadata.java:283) at com.datastax.driver.core.ColumnMetadata$IndexMetadata.access$000(ColumnMetadata.java:113) at com.datastax.driver.core.ColumnMetadata.<init>(ColumnMetadata.java:53) at com.datastax.driver.core.ColumnMetadata.fromRaw(ColumnMetadata.java:57) at com.datastax.driver.core.TableMetadata.build(TableMetadata.java:168) at com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:187) at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:119) at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:363) at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:271) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:194) at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:82) at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1307) at com.datastax.driver.core.Cluster.init(Cluster.java:159) at com.datastax.driver.core.Cluster.connect(Cluster.java:249) {noformat} This prevents this index from being parsed, but does not have any other impact other than the log entry on connect / schema refresh. To fix this, we should explicitly check for 'null' string when parsing index options.

    DataStax JIRA | 2 years ago | Andy Tolbert
    java.lang.IllegalArgumentException: Not a JSON map: null
  2. 0

    With the change for [JAVA-732] index metadata is now parsed for more than just CUSTOM types. When index_options for an index is null, it is actually a 'null' string instead of a null reference which causes problems in the parsing and yields the following error on connection: {noformat} 687 [main] ERROR com.datastax.driver.core.Metadata - Error parsing schema for table <ks>.<table>: Cluster.getMetadata().getKeyspace(<ks>).getTable(<table>) will be missing or incomplete java.lang.IllegalArgumentException: Not a JSON map: null at com.datastax.driver.core.SimpleJSONParser.parseStringMap(SimpleJSONParser.java:77) at com.datastax.driver.core.ColumnMetadata$IndexMetadata.build(ColumnMetadata.java:283) at com.datastax.driver.core.ColumnMetadata$IndexMetadata.access$000(ColumnMetadata.java:113) at com.datastax.driver.core.ColumnMetadata.<init>(ColumnMetadata.java:53) at com.datastax.driver.core.ColumnMetadata.fromRaw(ColumnMetadata.java:57) at com.datastax.driver.core.TableMetadata.build(TableMetadata.java:168) at com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:187) at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:119) at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:363) at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:271) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:194) at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:82) at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1307) at com.datastax.driver.core.Cluster.init(Cluster.java:159) at com.datastax.driver.core.Cluster.connect(Cluster.java:249) {noformat} This prevents this index from being parsed, but does not have any other impact other than the log entry on connect / schema refresh. To fix this, we should explicitly check for 'null' string when parsing index options.

    DataStax JIRA | 2 years ago | Andy Tolbert
    java.lang.IllegalArgumentException: Not a JSON map: null
  3. 0

    Running metadata test harness with cassandra fails to load snappy library

    GitHub | 2 years ago | ligadata-william
    java.lang.IllegalArgumentException: populate_io_cache_on_flush is not a column defined in this metadata
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Running metadata test harness with cassandra fails to load snappy library

    GitHub | 2 years ago | ligadata-william
    java.lang.IllegalArgumentException: populate_io_cache_on_flush is not a column defined in this metadata

    4 unregistered visitors

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Not a JSON map: null

      at com.datastax.driver.core.SimpleJSONParser.parseStringMap()
    2. DataStax Java Driver for Apache Cassandra - Core
      Cluster.connect
      1. com.datastax.driver.core.SimpleJSONParser.parseStringMap(SimpleJSONParser.java:77)
      2. com.datastax.driver.core.ColumnMetadata$IndexMetadata.build(ColumnMetadata.java:283)
      3. com.datastax.driver.core.ColumnMetadata$IndexMetadata.access$000(ColumnMetadata.java:113)
      4. com.datastax.driver.core.ColumnMetadata.<init>(ColumnMetadata.java:53)
      5. com.datastax.driver.core.ColumnMetadata.fromRaw(ColumnMetadata.java:57)
      6. com.datastax.driver.core.TableMetadata.build(TableMetadata.java:168)
      7. com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:187)
      8. com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:119)
      9. com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:363)
      10. com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:271)
      11. com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:194)
      12. com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:82)
      13. com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1307)
      14. com.datastax.driver.core.Cluster.init(Cluster.java:159)
      15. com.datastax.driver.core.Cluster.connect(Cluster.java:249)
      15 frames