java.lang.NullPointerException

null

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web190

  • via GitHub by dwursteisen
    ,
  • Stack trace

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

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Eric HendersonEric Henderson
    Once,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitor3 times, last one
    Unknown visitor
    Unknown visitorOnce,
    7 more bugmates