java.util.NoSuchElementException

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 {{WebClient}} with the following example and the server returns HTTP 401: {code} Mono<ResponseEntity<Map>> response = this.webClient                 .perform(peopleRequest().apply(httpBasic("rob","invalid")))                 .extract(response(Map.class)); {code} The client throws a {{NoSuchElementException}}: {code} java.util.NoSuchElementException: Source was empty     at reactor.core.publisher.MonoSingle$SingleSubscriber.onComplete(MonoSingle.java:179)     at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)     at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:762)     at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:520)     at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:500)     at reactor.core.publisher.FluxFlatMap$FlatMapMain.onComplete(FluxFlatMap.java:493)     at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)     at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:155)     at reactor.core.publisher.FluxSubscribeOn$SubscribeOnPipeline.onComplete(FluxSubscribeOn.java:136)     at reactor.core.publisher.Operators.complete(Operators.java:182)     at reactor.ipc.netty.common.NettyChannelHandler.subscribe(NettyChannelHandler.java:537)     at reactor.core.publisher.FluxSource.subscribe(FluxSource.java:59)     at reactor.core.publisher.FluxSubscribeOn$SourceSubscribeTask.run(FluxSubscribeOn.java:234)     at reactor.core.scheduler.ExecutorScheduler$ExecutorTrackedRunnable.run(ExecutorScheduler.java:136)     at io.netty.util.concurrent.SingleThreadEventExecutor.safeExecute(SingleThreadEventExecutor.java:451)     at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418)     at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:401)     at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877)     at java.lang.Thread.run(Thread.java:745) {code}
    via by Brian Clozel,
    • java.util.NoSuchElementException: Source was empty at reactor.core.publisher.MonoSingle$SingleSubscriber.onComplete(MonoSingle.java:179) at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:762) at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:520) at reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:500) at reactor.core.publisher.FluxFlatMap$FlatMapMain.onComplete(FluxFlatMap.java:493) at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:155) at reactor.core.publisher.FluxSubscribeOn$SubscribeOnPipeline.onComplete(FluxSubscribeOn.java:136) at reactor.core.publisher.Operators.complete(Operators.java:182) at reactor.ipc.netty.common.NettyChannelHandler.subscribe(NettyChannelHandler.java:537) at reactor.core.publisher.FluxSource.subscribe(FluxSource.java:59) at reactor.core.publisher.FluxSubscribeOn$SourceSubscribeTask.run(FluxSubscribeOn.java:234) at reactor.core.scheduler.ExecutorScheduler$ExecutorTrackedRunnable.run(ExecutorScheduler.java:136) at io.netty.util.concurrent.SingleThreadEventExecutor.safeExecute(SingleThreadEventExecutor.java:451) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:401) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877) at java.lang.Thread.run(Thread.java:745)
    No Bugmate found.