java.lang.UnsupportedOperationException

empty.head

Solutions on the web19

  • via GitHub by jdef
    , 1 year ago
    empty.head
  • via GitHub by drewhk
    , 1 year ago
    empty.head
  • via GitHub by fommil
    , 2 months ago
    empty.head
  • Stack trace

    • java.lang.UnsupportedOperationException: empty.head at scala.collection.immutable.Vector.head(Vector.scala:192) at service.ProposalService$$anonfun$finishVote$1$$anonfun$apply$1$$anonfun$apply$mcII$sp$2.apply(ProposalService.scala:123) at service.ProposalService$$anonfun$finishVote$1$$anonfun$apply$1$$anonfun$apply$mcII$sp$2.apply(ProposalService.scala:121) at scala.collection.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at service.ProposalService$$anonfun$finishVote$1$$anonfun$apply$1.apply$mcII$sp(ProposalService.scala:121) at service.ProposalService$$anonfun$finishVote$1$$anonfun$apply$1.apply(ProposalService.scala:118) at service.ProposalService$$anonfun$finishVote$1$$anonfun$apply$1.apply(ProposalService.scala:118) at scala.collection.immutable.List.foreach(List.scala:318) at service.ProposalService$$anonfun$finishVote$1.apply(ProposalService.scala:118) at service.ProposalService$$anonfun$finishVote$1.apply(ProposalService.scala:115) at scala.slick.backend.DatabaseComponent$DatabaseDef$$anonfun$withTransaction$1$$anonfun$apply$1.apply(DatabaseComponent.scala:44) at scala.slick.jdbc.JdbcBackend$BaseSession.withTransaction(JdbcBackend.scala:331) at scala.slick.backend.DatabaseComponent$DatabaseDef$$anonfun$withTransaction$1.apply(DatabaseComponent.scala:44) at scala.slick.backend.DatabaseComponent$DatabaseDef$$anonfun$withTransaction$1.apply(DatabaseComponent.scala:44) at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withSession(DatabaseComponent.scala:31) at scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef$$anon$4.withSession(JdbcBackend.scala:46) at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withTransaction(DatabaseComponent.scala:44) at scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef$$anon$4.withTransaction(JdbcBackend.scala:46) at service.ProposalService.finishVote(ProposalService.scala:115) at service.ProposalService$$anonfun$receive$1.applyOrElse(ProposalService.scala:146) at scala.runtime.AbstractPartialFunction$mcVL$sp.apply$mcVL$sp(AbstractPartialFunction.scala:33) at scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:33) at scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:25) at service.ExceptionHandling$Handled.apply(ExceptionHandling.scala:23) at service.ExceptionHandling$Handled.apply(ExceptionHandling.scala:20) at scala.PartialFunction$class.applyOrElse(PartialFunction.scala:118) at service.ExceptionHandling$Handled.applyOrElse(ExceptionHandling.scala:20) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:385) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)[error]

    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

    2 times, 2 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago