java.lang.NullPointerException: null

DataStax JIRA | Andrew Jorgensen | 10 months ago
  1. 0

    When doing a query like: {code} QueryBuilder.select() .all() .from("table") .where(eq("foo", bar)) .and(eq("bar", baz)); {code} If the `baz` variable is null then the datastax client will return a null pointer exception and crash. {code} ERROR [2016-03-14 14:51:54,112] Exception in getting result of future ! java.lang.NullPointerException: null ! at com.datastax.driver.core.querybuilder.Utils.appendName(Utils.java:237) ! at com.datastax.driver.core.querybuilder.Select.buildQueryString(Select.java:72) ! at com.datastax.driver.core.querybuilder.BuiltStatement.maybeRebuildCache(BuiltStatement.java:172) ! at com.datastax.driver.core.querybuilder.BuiltStatement.getValues(BuiltStatement.java:268) ! at com.datastax.driver.core.querybuilder.BuiltStatement$ForwardingStatement.getValues(BuiltStatement.java:436) ! at com.datastax.driver.core.querybuilder.Select$Where.getValues(Select.java:185) ! at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:548) ! at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:131) ! at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:63) {code} Is this expected? I am currently transitioning from Cassandra 1.1 cluster using the Hector client to a Cassandra 3.0 cluster using the official datastax client. The hector client appeared to be able to handle when column values were null, it might have just been serializing them to empty strings I'm not sure. Is there a way to more easily handle this with the datastax client or do I need to check to make sure the column value is not null for each column before issuing the query?

    DataStax JIRA | 10 months ago | Andrew Jorgensen
    java.lang.NullPointerException: null
  2. 0

    When doing a query like: {code} QueryBuilder.select() .all() .from("table") .where(eq("foo", bar)) .and(eq("bar", baz)); {code} If the `baz` variable is null then the datastax client will return a null pointer exception and crash. {code} ERROR [2016-03-14 14:51:54,112] Exception in getting result of future ! java.lang.NullPointerException: null ! at com.datastax.driver.core.querybuilder.Utils.appendName(Utils.java:237) ! at com.datastax.driver.core.querybuilder.Select.buildQueryString(Select.java:72) ! at com.datastax.driver.core.querybuilder.BuiltStatement.maybeRebuildCache(BuiltStatement.java:172) ! at com.datastax.driver.core.querybuilder.BuiltStatement.getValues(BuiltStatement.java:268) ! at com.datastax.driver.core.querybuilder.BuiltStatement$ForwardingStatement.getValues(BuiltStatement.java:436) ! at com.datastax.driver.core.querybuilder.Select$Where.getValues(Select.java:185) ! at com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:548) ! at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:131) ! at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:63) {code} Is this expected? I am currently transitioning from Cassandra 1.1 cluster using the Hector client to a Cassandra 3.0 cluster using the official datastax client. The hector client appeared to be able to handle when column values were null, it might have just been serializing them to empty strings I'm not sure. Is there a way to more easily handle this with the datastax client or do I need to check to make sure the column value is not null for each column before issuing the query?

    DataStax JIRA | 10 months ago | Andrew Jorgensen
    java.lang.NullPointerException: null
  3. 0
    Elasticsearch 1.x and 2.x nodes are not compatible, make sure your setup contains nodes of the same major version.
    via GitHub by dakrone
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    It is a JDK bug, no workaround currently.
    via GitHub by jroper
  6. 0
    Some of the parametes ar enull

    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. java.lang.NullPointerException

      null

      at com.datastax.driver.core.querybuilder.Utils.appendName()
    2. DataStax Java Driver for Apache Cassandra - Core
      AbstractSession.execute
      1. com.datastax.driver.core.querybuilder.Utils.appendName(Utils.java:237)
      2. com.datastax.driver.core.querybuilder.Select.buildQueryString(Select.java:72)
      3. com.datastax.driver.core.querybuilder.BuiltStatement.maybeRebuildCache(BuiltStatement.java:172)
      4. com.datastax.driver.core.querybuilder.BuiltStatement.getValues(BuiltStatement.java:268)
      5. com.datastax.driver.core.querybuilder.BuiltStatement$ForwardingStatement.getValues(BuiltStatement.java:436)
      6. com.datastax.driver.core.querybuilder.Select$Where.getValues(Select.java:185)
      7. com.datastax.driver.core.SessionManager.makeRequestMessage(SessionManager.java:548)
      8. com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:131)
      9. com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:63)
      9 frames