play.sbt.PlayExceptions$CompilationException

Compilation error[Cannot use a method returning java.util.concurrent.CompletionStage[play.mvc.Result] as a Handler for requests]

Samebug tips2

Import these into your controller:

import play.api.Play.current import play.api.i18n.Messages.Implicits._


rprp

BugmateHits had no serialization method.


poroszdporoszd

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

Solutions on the web45

Stack trace

  • play.sbt.PlayExceptions$CompilationException: Compilation error[Cannot use a method returning java.util.concurrent.CompletionStage[play.mvc.Result] as a Handler for requests] at play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27)[na:na] at play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27)[na:na] at scala.Option.map(Option.scala:145)[scala-library-2.11.7.jar:na] at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:49)[na:na] at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:44)[na:na] at scala.Option.map(Option.scala:145)[scala-library-2.11.7.jar:na] at play.sbt.run.PlayReload$.taskFailureHandler(PlayReload.scala:44)[na:na] at play.sbt.run.PlayReload$.compileFailure(PlayReload.scala:40)[na:na] at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17)[na:na] at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17)[na:na]

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

guizmaiiguizmaii
Once,
gpgekkogpgekko
Once,
poroszdporoszd
28 times, last one
rprp
172 times, last one
arnaudtarnaudt
Once,
14 more bugmates