scalaplayframework-2.5twirl

Twirl forwardsRouter No Such Method Error with b4-bootstrap


I am using Play 2.5.12 with b4-bootstrap. Today I have a strange problem. I asked also for b4-bootstrap support. But maybe here is someone who as a identical problem.

Error:

java.lang.NoSuchMethodError: play.routes.compiler.inject.twirl.forwardsRouter_Scope0$forwardsRouter._display_(Ljava/lang/Object;Lscala/reflect/Manifest;)Lplay/twirl/api/Appendable;
    at play.routes.compiler.inject.twirl.forwardsRouter_Scope0$forwardsRouter$$anonfun$apply$1.apply(forwardsRouter.template.scala:27)
    at play.routes.compiler.inject.twirl.forwardsRouter_Scope0$forwardsRouter$$anonfun$apply$1.apply(forwardsRouter.template.scala:27)
    at scala.Option.map(Option.scala:145)
    at play.routes.compiler.inject.twirl.forwardsRouter_Scope0$forwardsRouter.apply(forwardsRouter.template.scala:27)
    at play.routes.compiler.InjectedRoutesGenerator$.generateRouter(RoutesGenerator.scala:210)
    at play.routes.compiler.InjectedRoutesGenerator$.generate(RoutesGenerator.scala:154)
    at play.routes.compiler.RoutesCompiler$$anonfun$compile$1.apply(RoutesCompiler.scala:88)
    at play.routes.compiler.RoutesCompiler$$anonfun$compile$1.apply(RoutesCompiler.scala:87)
    at scala.util.Either$RightProjection.map(Either.scala:536)
    at play.routes.compiler.RoutesCompiler$.compile(RoutesCompiler.scala:87)
    at play.sbt.routes.RoutesCompiler$$anonfun$6$$anonfun$7.apply(RoutesCompiler.scala:137)
    at play.sbt.routes.RoutesCompiler$$anonfun$6$$anonfun$7.apply(RoutesCompiler.scala:136)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
    at scala.collection.immutable.List.foreach(List.scala:318)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
    at scala.collection.AbstractTraversable.map(Traversable.scala:105)
    at play.sbt.routes.RoutesCompiler$$anonfun$6.apply(RoutesCompiler.scala:136)
    at play.sbt.routes.RoutesCompiler$$anonfun$6.apply(RoutesCompiler.scala:134)
    at com.typesafe.sbt.web.incremental.package$.syncIncremental(package.scala:228)
    at play.sbt.routes.RoutesCompiler$.compileRoutes(RoutesCompiler.scala:134)
    at play.sbt.routes.RoutesCompiler$$anonfun$4.apply(RoutesCompiler.scala:127)
    at play.sbt.routes.RoutesCompiler$$anonfun$4.apply(RoutesCompiler.scala:126)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (web/compile:playRoutes) java.lang.NoSuchMethodError: play.routes.compiler.inject.twirl.forwardsRouter_Scope0$forwardsRouter._display_(Ljava/lang/Object;Lscala/reflect/Manifest;)Lplay/twirl/api/Appendable;

My minimal example is

@import logic.userComponent.auth.DefaultEnv
@import com.mohiva.play.silhouette.api.actions.UserAwareRequest
@import play.api.Configuration
@import form.SignInForm
@import play.twirl.api.Content
@()(implicit lang:Messages,req: UserAwareRequest[DefaultEnv,_], webJarAssets: WebJarAssets, config: Configuration)

@implicitFieldConstructor = @{ b4.horizontal.fieldConstructor("col-md-4", "col-md-8") }

<html>
    <head></head>
    <body>
        ahllo
        @b4.hidden("hideMe","")
        @* @b4.text(SignInForm.form("email")) *@
    </body>
</html>

I do not understand the error. Because last week all works fine.


Solution

  • I found the problem!!!!

    For all those could run in the same! This was the solution!

    I used "com.vmunier" %% "scalajs-scripts" % "1.1.0" but for my twirl I need -> "com.vmunier" %% "scalajs-scripts" % "1.0.0"