java.lang.NullPointerException: null

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

java.lang.NullPointerException: null
at org.springframework.core.codec.ByteBufferEncoder.canEncode(ByteBufferEncoder.java:46)
at org.springframework.http.codec.EncoderHttpMessageWriter.canWrite(EncoderHttpMessageWriter.java:63)
at org.springframework.web.reactive.result.method.annotation.AbstractMessageWriterResultHandler.lambda$getProducibleMediaTypes$0(AbstractMessageWriterResultHandler.java:135)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.springframework.web.reactive.result.method.annotation.AbstractMessageWriterResultHandler.getProducibleMediaTypes(AbstractMessageWriterResultHandler.java:137)
at org.springframework.web.reactive.result.method.annotation.AbstractMessageWriterResultHandler.writeBody(AbstractMessageWriterResultHandler.java:113)
at org.springframework.web.reactive.result.method.annotation.ResponseEntityResultHandler.lambda$handleResult$2(ResponseEntityResultHandler.java:161)
at reactor.core.publisher.MonoThenApply$MonoThenApplyManager.onNext(MonoThenApply.java:97)
at reactor.adapter.RxJava1Adapter$SingleAsMono$SingleAsMonoSubscriber.onSuccess(RxJava1Adapter.java:436)
at rx.Single$18.onNext(Single.java:1797)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139)
at rx.internal.producers.SingleDelayedProducer.emit(SingleDelayedProducer.java:102)
at rx.internal.producers.SingleDelayedProducer.setValue(SingleDelayedProducer.java:85)
at rx.Single$1$1.onSuccess(Single.java:84)
at rx.internal.util.ScalarSynchronousSingle$1.call(ScalarSynchronousSingle.java:40)
at rx.internal.util.ScalarSynchronousSingle$1.call(ScalarSynchronousSingle.java:36)
at rx.Single$1.call(Single.java:94)
at rx.Single$1.call(Single.java:74)
at rx.Single.subscribe(Single.java:1725)
at rx.Single.subscribe(Single.java:1802)
at reactor.adapter.RxJava1Adapter$SingleAsMono.subscribe(RxJava1Adapter.java:398)
at reactor.core.publisher.MonoThenApply.subscribe(MonoThenApply.java:57)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoThenApply$MonoThenApplyManager.onNext(MonoThenApply.java:131)
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:913)
at reactor.core.publisher.MonoThenApply$MonoThenApplyManager$SecondSubscriber.onNext(MonoThenApply.java:201)
at reactor.core.publisher.FluxResume$ResumeSubscriber.onNext(FluxResume.java:74)
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:126)
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:1529)
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:182)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:1246)
at reactor.core.publisher.FluxResume$ResumeSubscriber.onSubscribe(FluxResume.java:69)
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96)
at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:169)
at reactor.core.publisher.MonoThenApply.subscribe(MonoThenApply.java:50)
at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:66)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoThenApply$MonoThenApplyManager.onNext(MonoThenApply.java:131)
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:71)
at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:81)
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:383)
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onSubscribe(FluxConcatMap.java:192)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:95)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:59)
at reactor.core.publisher.FluxConcatMap.subscribe(FluxConcatMap.java:116)
at reactor.core.publisher.MonoNext.subscribe(MonoNext.java:44)
at reactor.core.publisher.MonoOtherwiseIfEmpty.subscribe(MonoOtherwiseIfEmpty.java:47)
at reactor.core.publisher.MonoThenApply.subscribe(MonoThenApply.java:57)
at reactor.core.publisher.MonoThenApply.subscribe(MonoThenApply.java:57)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoThenSupply$MonoConcatIgnoreManager.drain(MonoThenSupply.java:166)
at reactor.core.publisher.MonoThenSupply.subscribe(MonoThenSupply.java:54)
at reactor.ipc.netty.http.NettyHttpServerHandler.channelRead(NettyHttpServerHandler.java:92)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:571)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:512)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:426)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:398)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

Once, 6 months ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago
Samebug visitor profile picture
Unknown user
Once, 9 months ago
Samebug visitor profile picture
Unknown user
3 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.