Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-324

Avoid NPE when Host is Up, but no CB is running

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Security Level: Public
    • Labels:
      None

      Description

      When the target host is reachable, but no server is running, the client throws a unhelpful NPE:

      Caused by: java.lang.NullPointerException
      at com.couchbase.client.vbucket.ConfigurationProviderHTTP.getBucketConfiguration(ConfigurationProviderHTTP.java:148)
      at com.couchbase.client.CouchbaseConnectionFactory.getVBucketConfig(CouchbaseConnectionFactory.java:231)
      at com.couchbase.client.CouchbaseClient.<init>(CouchbaseClient.java:237)
      at com.couchbase.client.CouchbaseClient.<init>(CouchbaseClient.java:175)

      The logs also show more infos, but this NPE is not helpful in the stack.

        Issue Links

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Show
          bdw429s Brad Wood added a comment - Additional info here: http://www.couchbase.com/communities/q-and-a/sdk-throws-unhelpful-npe-when-server-unreachable
          Hide
          daschl Michael Nitschinger added a comment -

          Brad, are you sure this is not fixed with recent releases?

          I tried

          • not running node
          • running node with wrong bucket name
          • running node with wrong password

          and I always get com.couchbase.client.vbucket.ConfigurationExceptions and not NPEs anymore... this is with vanilla 1.2.2 but I remeber fixing it earlier.

          If you still see it, can you get me more information on the environment?

          Show
          daschl Michael Nitschinger added a comment - Brad, are you sure this is not fixed with recent releases? I tried not running node running node with wrong bucket name running node with wrong password and I always get com.couchbase.client.vbucket.ConfigurationExceptions and not NPEs anymore... this is with vanilla 1.2.2 but I remeber fixing it earlier. If you still see it, can you get me more information on the environment?

            People

            • Assignee:
              daschl Michael Nitschinger
              Reporter:
              daschl Michael Nitschinger
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes