java.util.NoSuchElementException: Source was empty

Spring JIRA | Brian Clozel | 9 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    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}

    Spring JIRA | 9 months ago | Brian Clozel
    java.util.NoSuchElementException: Source was empty
  2. 0

    MaxDB Cannot open connection

    oreports | 1 decade ago | jyotaro
    java.util.NoSuchElementException: Could not create a validated object         at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericOb jectPool.java:851)         at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSo urce.java:140)         at net.sf.hibernate.connection.DBCPConnectionProvider.getConnection(DBCP ConnectionProvider.java:41)         at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278 )         at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)         at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)         at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.ja va:40)         at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction( JDBCTransactionFactory.java:19)         at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2 195)         at org.efs.openreports.providers.persistence.UserPersistenceProvider.get User(UserPersistenceProvider.java:52)         at org.efs.openreports.providers.impl.UserProviderImpl.getUser(UserProvi derImpl.java:49)         at org.efs.openreports.actions.LoginAction.execute(LoginAction.java:47)         at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionIn vocation.java:173)         at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(Around Interceptor.java:37)         at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionIn vocation.java:170)         at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(Around Interceptor.java:37)         at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionIn vocation.java:170)         at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(Around Interceptor.java:37)         at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionIn vocation.java:170)         at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy. java:116)         at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(S ervletDispatcher.java:182)         at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(Servlet Dispatcher.java:162)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:247)         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:193)         at com.opensymphony.webwork.lifecycle.RequestLifecycleFilter.doFilter(Re questLifecycleFilter.java:62)         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:213)         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:193)         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:256)         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex t.invokeNext(StandardPipeline.java:643)         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:480)         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:191)         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex t.invokeNext(StandardPipeline.java:643)         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:480)         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java: 2416)         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:180)         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex t.invokeNext(StandardPipeline.java:643)         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche rValve.java:171)         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex t.invokeNext(StandardPipeline.java:641)         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:172)         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex t.invokeNext(StandardPipeline.java:641)         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:480)         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:174)         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex t.invokeNext(StandardPipeline.java:643)         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:480)         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

    Root Cause Analysis

    1. java.util.NoSuchElementException

      Source was empty

      at reactor.core.publisher.MonoSingle$SingleSubscriber.onComplete()
    2. reactor.core.publisher
      Operators.complete
      1. reactor.core.publisher.MonoSingle$SingleSubscriber.onComplete(MonoSingle.java:179)
      2. reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)
      3. reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:762)
      4. reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:520)
      5. reactor.core.publisher.FluxFlatMap$FlatMapMain.drain(FluxFlatMap.java:500)
      6. reactor.core.publisher.FluxFlatMap$FlatMapMain.onComplete(FluxFlatMap.java:493)
      7. reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)
      8. reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:155)
      9. reactor.core.publisher.FluxSubscribeOn$SubscribeOnPipeline.onComplete(FluxSubscribeOn.java:136)
      10. reactor.core.publisher.Operators.complete(Operators.java:182)
      10 frames
    3. reactor.ipc.netty
      NettyChannelHandler.subscribe
      1. reactor.ipc.netty.common.NettyChannelHandler.subscribe(NettyChannelHandler.java:537)
      1 frame
    4. reactor.core.publisher
      FluxSubscribeOn$SourceSubscribeTask.run
      1. reactor.core.publisher.FluxSource.subscribe(FluxSource.java:59)
      2. reactor.core.publisher.FluxSubscribeOn$SourceSubscribeTask.run(FluxSubscribeOn.java:234)
      2 frames
    5. reactor.core.scheduler
      ExecutorScheduler$ExecutorTrackedRunnable.run
      1. reactor.core.scheduler.ExecutorScheduler$ExecutorTrackedRunnable.run(ExecutorScheduler.java:136)
      1 frame
    6. Netty
      SingleThreadEventExecutor$5.run
      1. io.netty.util.concurrent.SingleThreadEventExecutor.safeExecute(SingleThreadEventExecutor.java:451)
      2. io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:418)
      3. io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:401)
      4. io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877)
      4 frames
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame