java.lang.NullPointerException

DataStax JIRA | Viliam Holub | 3 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

    The Java driver fails with a NullPointerException when connecting to a Cassandra 1.2 cluster in which some CFs are not CQL tables. Steps to reproduce: In cassandra-cli: {code} $ cassandra-cli Connected to: "Test Cluster" on 127.0.0.1/9160 Welcome to Cassandra CLI version 1.2.15-SNAPSHOT Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit. [default@unknown] create keyspace ks1; 28f919c1-d616-373e-a529-4fd61e3c5303 [default@unknown] use ks1; Authenticated to keyspace: ks1 [default@ks1] create column family cf1; c68b19b9-0a21-34c7-b4a7-e8edbd9fa6f1 {code} A call to cluster.connect() fails with: {code} Exception in thread "main" java.lang.NullPointerException at com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:127) at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:92) at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:291) at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:230) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:170) at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:78) at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:977) at com.datastax.driver.core.Cluster$Manager.newSession(Cluster.java:1014) at com.datastax.driver.core.Cluster$Manager.access$200(Cluster.java:889) at com.datastax.driver.core.Cluster.connect(Cluster.java:170) {code}

    DataStax JIRA | 3 years ago | Nicolas Favre-Felix
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    The Java driver fails with a NullPointerException when connecting to a Cassandra 1.2 cluster in which some CFs are not CQL tables. Steps to reproduce: In cassandra-cli: {code} $ cassandra-cli Connected to: "Test Cluster" on 127.0.0.1/9160 Welcome to Cassandra CLI version 1.2.15-SNAPSHOT Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit. [default@unknown] create keyspace ks1; 28f919c1-d616-373e-a529-4fd61e3c5303 [default@unknown] use ks1; Authenticated to keyspace: ks1 [default@ks1] create column family cf1; c68b19b9-0a21-34c7-b4a7-e8edbd9fa6f1 {code} A call to cluster.connect() fails with: {code} Exception in thread "main" java.lang.NullPointerException at com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:127) at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:92) at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:291) at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:230) at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:170) at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:78) at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:977) at com.datastax.driver.core.Cluster$Manager.newSession(Cluster.java:1014) at com.datastax.driver.core.Cluster$Manager.access$200(Cluster.java:889) at com.datastax.driver.core.Cluster.connect(Cluster.java:170) {code}

    DataStax JIRA | 3 years ago | Nicolas Favre-Felix
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.datastax.driver.core.ReplicationStrategy$NetworkTopologyStrategy.computeTokenToReplicaMap()
    2. DataStax Java Driver for Apache Cassandra - Core
      Cluster.connect
      1. com.datastax.driver.core.ReplicationStrategy$NetworkTopologyStrategy.computeTokenToReplicaMap(ReplicationStategy.java:128)
      2. com.datastax.driver.core.Metadata$TokenMap.build(Metadata.java:288)
      3. com.datastax.driver.core.Metadata.rebuildTokenMap(Metadata.java:142)
      4. com.datastax.driver.core.ControlConnection.refreshNodeListAndTokenMap(ControlConnection.java:385)
      5. com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:263)
      6. com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:214)
      7. com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:161)
      8. com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
      9. com.datastax.driver.core.Cluster$Manager.init(Cluster.java:890)
      10. com.datastax.driver.core.Cluster$Manager.newSession(Cluster.java:910)
      11. com.datastax.driver.core.Cluster$Manager.access$200(Cluster.java:806)
      12. com.datastax.driver.core.Cluster.connect(Cluster.java:158)
      12 frames