java.util.NoSuchElementException

head of empty list

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 web93

  • via GitHub by lespea
    ,
  • Stack trace

    • java.util.NoSuchElementException: head of empty list at scala.collection.immutable.Nil$.head(List.scala:420) at scala.collection.immutable.Nil$.head(List.scala:417) at code.bankconnectors.KafkaLibMappedConnector$.getOtherBankAccount(KafkaLibMappedConnector.scala:417) at code.bankconnectors.KafkaLibMappedConnector$$anonfun$getOtherBankAccounts$1.apply(KafkaLibMappedConnector.scala:477) at code.bankconnectors.KafkaLibMappedConnector$$anonfun$getOtherBankAccounts$1.apply(KafkaLibMappedConnector.scala:477) at scala.collection.immutable.List.flatMap(List.scala:327) at code.bankconnectors.KafkaLibMappedConnector$.getOtherBankAccounts(KafkaLibMappedConnector.scala:477) at code.model.BankAccount$class.moderatedOtherBankAccounts(BankingData.scala:523) at code.bankconnectors.KafkaLibMappedConnector$KafkaBankAccount.moderatedOtherBankAccounts(KafkaLibMappedConnector.scala:1026) at code.api.v1_2_1.APIMethods121$$$$$$a411139bb35eb6edca53c9282e437eb$$$$nonfun$apply$76.apply(APIMethods121.scala:855) at code.api.v1_2_1.APIMethods121$$$$$$a411139bb35eb6edca53c9282e437eb$$$$nonfun$apply$76.apply(APIMethods121.scala:854) at net.liftweb.common.Full.flatMap(Box.scala:612) at code.api.v1_2_1.APIMethods121$$$$$$29d3ea8f486f5eff9ea275d50d3ce41$$$$nonfun$apply$75.apply(APIMethods121.scala:854) at code.api.v1_2_1.APIMethods121$$$$$$29d3ea8f486f5eff9ea275d50d3ce41$$$$nonfun$apply$75.apply(APIMethods121.scala:853) at net.liftweb.common.Full.flatMap(Box.scala:612) at code.api.v1_2_1.APIMethods121$$$$$$baa1579e233cb157f8227d63e8353da1$$$$$applyOrElse$23.apply(APIMethods121.scala:853) at code.api.v1_2_1.APIMethods121$$$$$$baa1579e233cb157f8227d63e8353da1$$$$$applyOrElse$23.apply(APIMethods121.scala:851) at code.api.OBPRestHelper$class.failIfBadAuthorizationHeader(OBPRestHelper.scala:136) at code.api.v1_2_1.OBPAPI1_2_1$.failIfBadAuthorizationHeader(OBPAPI1.2.1.scala:41) at code.api.OBPRestHelper$$anon$2.apply(OBPRestHelper.scala:195) at code.api.OBPRestHelper$$anon$2.apply(OBPRestHelper.scala:189) at code.api.OBPRestHelper$$anon$3.apply(OBPRestHelper.scala:223) at code.api.OBPRestHelper$$anon$3.apply(OBPRestHelper.scala:219) at net.liftweb.http.rest.RestHelper$class.apply(RestHelper.scala:522) at code.api.v1_2_1.OBPAPI1_2_1$.apply(OBPAPI1.2.1.scala:41) at code.api.v1_2_1.OBPAPI1_2_1$.apply(OBPAPI1.2.1.scala:41) at net.liftweb.util.NamedPF$$anonfun$applyBox$1.apply(NamedPartialFunction.scala:97) at net.liftweb.util.NamedPF$$anonfun$applyBox$1.apply(NamedPartialFunction.scala:97) at net.liftweb.common.Full.map(Box.scala:610) at net.liftweb.util.NamedPF$.applyBox(NamedPartialFunction.scala:97) at net.liftweb.http.LiftServlet$$anonfun$1.apply$mcZ$sp(LiftServlet.scala:281) at net.liftweb.http.LiftServlet$$anonfun$1.apply(LiftServlet.scala:279) at net.liftweb.http.LiftServlet$$anonfun$1.apply(LiftServlet.scala:279) at net.liftweb.http.S$class.net$liftweb$http$S$$wrapQuery(S.scala:1470) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit$1$$anonfun$apply$37.apply(S.scala:1635) at net.liftweb.http.S$class.net$liftweb$http$S$$doAround(S.scala:1399) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$doAround$1.apply(S.scala:1400) at net.liftweb.db.DB$$anon$2$$anonfun$apply$15.net$liftweb$db$DB$class$$anon$$anonfun$$recurseMe$1(DB.scala:244) at net.liftweb.db.DB$$anon$2$$anonfun$apply$15$$anonfun$net$liftweb$db$DB$class$$anon$$anonfun$$recurseMe$1$1.apply(DB.scala:260) at net.liftweb.db.DB$$anon$2$$anonfun$apply$15$$anonfun$net$liftweb$db$DB$class$$anon$$anonfun$$recurseMe$1$1.apply(DB.scala:260) at net.liftweb.db.DB$$anonfun$use$1.apply(DB.scala:701) at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:95) at net.liftweb.db.DB$currentConn$.run(DB.scala:686) at net.liftweb.db.DB$class.use(DB.scala:698) at net.liftweb.db.DB$$anon$1.use(DB.scala:40) at net.liftweb.db.DB$$anon$2$$anonfun$apply$15.net$liftweb$db$DB$class$$anon$$anonfun$$recurseMe$1(DB.scala:260) at net.liftweb.db.DB$$anon$2$$anonfun$apply$15.apply(DB.scala:262) at net.liftweb.util.DynoVar$class.run(ThreadGlobal.scala:95) at net.liftweb.db.DB$$anon$2$DepthCnt$.run(DB.scala:233) at net.liftweb.db.DB$$anon$2.apply(DB.scala:236) at net.liftweb.http.S$class.net$liftweb$http$S$$doAround(S.scala:1400) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest2InnerInit$1.apply(S.scala:1633) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$class.net$liftweb$http$S$$_nest2InnerInit(S.scala:1632) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$$anonfun$apply$41$$anonfun$apply$42$$anonfun$apply$43$$anonfun$apply$44.apply(S.scala:1676) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$$anonfun$withReq$1.apply(S.scala:1686) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$class.withReq(S.scala:1685) at net.liftweb.http.S$.withReq(S.scala:47) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$$anonfun$apply$41$$anonfun$apply$42$$anonfun$apply$43.apply(S.scala:1672) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$$anonfun$apply$41$$anonfun$apply$42.apply(S.scala:1670) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1$$anonfun$apply$41.apply(S.scala:1669) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_innerInit$1.apply(S.scala:1668) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$class.net$liftweb$http$S$$_innerInit(S.scala:1667) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_init$1$$anonfun$apply$47$$anonfun$apply$48$$anonfun$apply$49$$anonfun$apply$50$$anonfun$apply$51.apply(S.scala:1709) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_init$1$$anonfun$apply$47$$anonfun$apply$48$$anonfun$apply$49$$anonfun$apply$50.apply(S.scala:1707) at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:605) at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:507) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_init$1$$anonfun$apply$47$$anonfun$apply$48$$anonfun$apply$49.apply(S.scala:1706) at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:605) at net.liftweb.http.TransientRequestVarHandler$.apply(Vars.scala:520) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_init$1$$anonfun$apply$47$$anonfun$apply$48.apply(S.scala:1705) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_init$1$$anonfun$apply$47.apply(S.scala:1704) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_init$1.apply(S.scala:1703) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.S$class.net$liftweb$http$S$$_init(S.scala:1702) at net.liftweb.http.S$class.statelessInit(S.scala:1302) at net.liftweb.http.S$.statelessInit(S.scala:47) at net.liftweb.http.LiftServlet.doService(LiftServlet.scala:279) at net.liftweb.http.LiftServlet$$anonfun$doIt$1$1.apply(LiftServlet.scala:148) at net.liftweb.http.LiftServlet$$anonfun$doIt$1$1.apply(LiftServlet.scala:147) at net.liftweb.util.TimeHelpers$class.calcTime(TimeHelpers.scala:346) at net.liftweb.util.Helpers$.calcTime(Helpers.scala:34) at net.liftweb.util.TimeHelpers$class.logTime(TimeHelpers.scala:365) at net.liftweb.util.Helpers$.logTime(Helpers.scala:34) at net.liftweb.http.LiftServlet.doIt$1(LiftServlet.scala:147) at net.liftweb.http.LiftServlet.service(LiftServlet.scala:158) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply$mcV$sp(HTTPProvider.scala:72) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(HTTPProvider.scala:71) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(HTTPProvider.scala:71) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.URLRewriter$.doWith(Req.scala:1327) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2$$anonfun$apply$mcV$sp$1.apply$mcV$sp(HTTPProvider.scala:70) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2$$anonfun$apply$mcV$sp$1.apply(HTTPProvider.scala:70) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2$$anonfun$apply$mcV$sp$1.apply(HTTPProvider.scala:70) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2.apply$mcV$sp(HTTPProvider.scala:66) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2.apply(HTTPProvider.scala:60) at net.liftweb.http.provider.HTTPProvider$$anonfun$service$2.apply(HTTPProvider.scala:60) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.provider.HTTPProvider$class.service(HTTPProvider.scala:60) at net.liftweb.http.LiftFilter.service(LiftServlet.scala:928) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply$mcV$sp(ServletFilterProvider.scala:82) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(ServletFilterProvider.scala:82) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$mcV$sp$2.apply(ServletFilterProvider.scala:82) at net.liftweb.http.provider.servlet.ServletFilterProvider$class.handleLoan$1(ServletFilterProvider.scala:59) at net.liftweb.http.provider.servlet.ServletFilterProvider$class.net$liftweb$http$provider$servlet$ServletFilterProvider$$handleLoanWrappers(ServletFilterProvider.scala:63) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ServletFilterProvider.scala:82) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1$$anonfun$apply$mcV$sp$1.apply(ServletFilterProvider.scala:77) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1$$anonfun$apply$mcV$sp$1.apply(ServletFilterProvider.scala:77) at net.liftweb.http.CoreRequestVarHandler$$anonfun$apply$16$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19.apply(Vars.scala:611) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.CoreRequestVarHandler$$anonfun$apply$16$$anonfun$apply$17$$anonfun$apply$18.apply(Vars.scala:610) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.CoreRequestVarHandler$$anonfun$apply$16$$anonfun$apply$17.apply(Vars.scala:609) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.CoreRequestVarHandler$$anonfun$apply$16.apply(Vars.scala:608) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:607) at net.liftweb.http.RequestVarHandler$.apply(Vars.scala:507) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1.apply$mcV$sp(ServletFilterProvider.scala:75) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1.apply(ServletFilterProvider.scala:75) at net.liftweb.http.provider.servlet.ServletFilterProvider$$anonfun$doFilter$1.apply(ServletFilterProvider.scala:75) at net.liftweb.http.CoreRequestVarHandler$$anonfun$apply$16$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19.apply(Vars.scala:611) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.CoreRequestVarHandler$$anonfun$apply$16$$anonfun$apply$17$$anonfun$apply$18.apply(Vars.scala:610) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.CoreRequestVarHandler$$anonfun$apply$16$$anonfun$apply$17.apply(Vars.scala:609) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.CoreRequestVarHandler$$anonfun$apply$16.apply(Vars.scala:608) at net.liftweb.util.ThreadGlobal.doWith(ThreadGlobal.scala:71) at net.liftweb.http.CoreRequestVarHandler$class.apply(Vars.scala:607) at net.liftweb.http.TransientRequestVarHandler$.apply(Vars.scala:520) at net.liftweb.http.provider.servlet.ServletFilterProvider$class.doFilter(ServletFilterProvider.scala:74) at net.liftweb.http.LiftFilter.doFilter(LiftServlet.scala:928) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1022) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:745)

    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

    bandocabandoca
    3 times, last one
    rprp
    2 times, last one
    jokesterjokester
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    2 more bugmates