java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When using the method 'bucket.bucketManager().getDesignDocuments()' when there are non-data nodes present in the cluster causes a null pointer exception to be thrown: {code} Exception in thread "main" java.lang.NullPointerException at com.couchbase.client.java.bucket.DefaultAsyncBucketManager$3.call(DefaultAsyncBucketManager.java:161) at com.couchbase.client.java.bucket.DefaultAsyncBucketManager$3.call(DefaultAsyncBucketManager.java:150) at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:66) at rx.observers.Subscribers$5.onNext(Subscribers.java:229) at rx.internal.producers.SingleProducer.request(SingleProducer.java:65) at rx.Subscriber.setProducer(Subscriber.java:211) at rx.internal.operators.OperatorMap$MapSubscriber.setProducer(OperatorMap.java:99) at rx.Subscriber.setProducer(Subscriber.java:205) at rx.subjects.AsyncSubject.onCompleted(AsyncSubject.java:105) at com.couchbase.client.core.endpoint.AbstractGenericHandler.completeResponse(AbstractGenericHandler.java:348) at com.couchbase.client.core.endpoint.AbstractGenericHandler.access$000(AbstractGenericHandler.java:66) at com.couchbase.client.core.endpoint.AbstractGenericHandler$1.call(AbstractGenericHandler.java:366) at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: com.couchbase.client.core.message.config.GetDesignDocumentsResponse.class at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:109) at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:70) ... 17 more {code} I have attached debug level logging with this failure (NPE_failure.log). Interestingly it only seems to occur if the node that I connect to in my bootstrap list is non-data. If I change my code to bootstrap off of the data node then I don't have this problem, I have attached the log as NPE_success.log. The code to reproduce this is very simple: {code} import com.couchbase.client.java.Bucket; import com.couchbase.client.java.CouchbaseCluster; public class Main { public static void main(String[] args){ Bucket bucket = CouchbaseCluster.create("10.142.150.101").openBucket("beer-sample"); System.out.println(bucket.bucketManager().getDesignDocuments()); } } {code}
    via by Matt Carabine,
  • When using the method 'bucket.bucketManager().getDesignDocuments()' when there are non-data nodes present in the cluster causes a null pointer exception to be thrown: {code} Exception in thread "main" java.lang.NullPointerException at com.couchbase.client.java.bucket.DefaultAsyncBucketManager$3.call(DefaultAsyncBucketManager.java:161) at com.couchbase.client.java.bucket.DefaultAsyncBucketManager$3.call(DefaultAsyncBucketManager.java:150) at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:66) at rx.observers.Subscribers$5.onNext(Subscribers.java:229) at rx.internal.producers.SingleProducer.request(SingleProducer.java:65) at rx.Subscriber.setProducer(Subscriber.java:211) at rx.internal.operators.OperatorMap$MapSubscriber.setProducer(OperatorMap.java:99) at rx.Subscriber.setProducer(Subscriber.java:205) at rx.subjects.AsyncSubject.onCompleted(AsyncSubject.java:105) at com.couchbase.client.core.endpoint.AbstractGenericHandler.completeResponse(AbstractGenericHandler.java:348) at com.couchbase.client.core.endpoint.AbstractGenericHandler.access$000(AbstractGenericHandler.java:66) at com.couchbase.client.core.endpoint.AbstractGenericHandler$1.call(AbstractGenericHandler.java:366) at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: com.couchbase.client.core.message.config.GetDesignDocumentsResponse.class at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:109) at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:70) ... 17 more {code} I have attached debug level logging with this failure (NPE_failure.log). Interestingly it only seems to occur if the node that I connect to in my bootstrap list is non-data. If I change my code to bootstrap off of the data node then I don't have this problem, I have attached the log as NPE_success.log. The code to reproduce this is very simple: {code} import com.couchbase.client.java.Bucket; import com.couchbase.client.java.CouchbaseCluster; public class Main { public static void main(String[] args){ Bucket bucket = CouchbaseCluster.create("10.142.150.101").openBucket("beer-sample"); System.out.println(bucket.bucketManager().getDesignDocuments()); } } {code}
    via by Matt Carabine,
  • NullPointerException in merge
    via GitHub by abersnaze
    ,
    • java.lang.NullPointerException at com.couchbase.client.java.bucket.DefaultAsyncBucketManager$3.call(DefaultAsyncBucketManager.java:161) at com.couchbase.client.java.bucket.DefaultAsyncBucketManager$3.call(DefaultAsyncBucketManager.java:150) at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:66) at rx.observers.Subscribers$5.onNext(Subscribers.java:229) at rx.internal.producers.SingleProducer.request(SingleProducer.java:65) at rx.Subscriber.setProducer(Subscriber.java:211) at rx.internal.operators.OperatorMap$MapSubscriber.setProducer(OperatorMap.java:99) at rx.Subscriber.setProducer(Subscriber.java:205) at rx.subjects.AsyncSubject.onCompleted(AsyncSubject.java:105) at com.couchbase.client.core.endpoint.AbstractGenericHandler.completeResponse(AbstractGenericHandler.java:348) at com.couchbase.client.core.endpoint.AbstractGenericHandler.access$000(AbstractGenericHandler.java:66) at com.couchbase.client.core.endpoint.AbstractGenericHandler$1.call(AbstractGenericHandler.java:366) at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: com.couchbase.client.core.message.config.GetDesignDocumentsResponse.class at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:109) at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:70) ... 17 more

    Users with the same issue

    rsprangemeijer
    rsprangemeijer1 times, last one,
    andyglick
    andyglick5 times, last one,
    Unknown visitor1 times, last one,
    musketyr
    musketyr1 times, last one,
    Unknown visitor1 times, last one,
    6 more bugmates