Details
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:
- Start fresh Couchbase docker image,
- 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
- is cloned by
-
SCBC-367 Getting NullPointerException while creating FTS index on newly couchbase docker image
-
- Resolved
-
For Gerrit Dashboard: JCBC-1993 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
179004,2 | JCBC-1993, SCBC-367: NPE when no search index exists on the cluster. | master | couchbase-jvm-clients | Status: MERGED | +2 | +1 |