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

Getting NullPointerException while creating FTS index on newly couchbase docker image

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.3.4
    • 3.3.2, 3.3.3
    • FTS
    • None
    • Docker image: Couchbase:community-7.1.1
      Java SDK: com.couchbase.client:java-client:3.3.3
    • 1
    • Medium

    Description

      I am getting Null pointer exception in following class:

       

      AsyncSearchIndexManager.java:171

      -> getAllIndexes()

      -> return new ArrayList<>(indexes.values());

      Here indexes is null and because of that I am getting error.

       

      Reproduce step:

      1. Start fresh Couchbase docker image,
      2. try to create FTS index from java code, it fails due to NullPointerException.

       

      Workaround:

      1. Create any FTS index from Couchbase UI

      2. Remove created FTS index ( remove if u want, that does not matter )

      3. Run java code to execute FTS index, it works.

       

      It works only if we create at-least one manually.

      The reason is because 

      "/api/index" is returning response { "status" : "ok", "indexDefs" : null } when we try to create index on fresh docker image because here indexDefs is null, it causing NullPointerException.

      And after we create & delete any FTS index manually and after  that we are getting different response  { "status" : "ok", "indexDefs" : { "uuid" :"XXXX", "indexDefs": {}, "implVersion" :"5.6.0" } }

       

      Attachments

        Issue Links

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

          Activity

            People

              daschl Michael Nitschinger
              hiren.rojasara Hiren Soni
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty