2.5 -> 2.6 Migration problem [scala] - Guice

861 views
Skip to first unread message

fijimf

unread,
Aug 1, 2017, 12:40:10 AM8/1/17
to Play Framework
Hi -

Migrating from 2.5 to 2.6, I have run a across a problem where Guice is unable to wire up my application.

ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.NoSuchMethodError: controllers.AssetsBuilder.<init>(Lplay/api/http/HttpErrorHandler;)V
  at controllers
.WebJarAssets.<init>(WebJarAssets.scala:19)
  at controllers
.WebJarAssets.class(WebJarAssets.scala:19)
 
while locating controllers.WebJarAssets
   
for the 4th parameter of controllers.SignOutController.<init>(SignOutController.scala:21)
 
while locating controllers.SignOutController
   
for the 16th parameter of ....


This is a very thorough error message, and I feel like what I need to do should be obvious, and yet I'm stymied.

The code worked in 2.5.  I updated relevant portion of build.sbt to 

"com.typesafe.play" %% "play-json" % "2.6.2",
"org.webjars" %% "webjars-play" % "2.6.0",

I am not a Play expert and decidedly not a Guice expetrt.  It looks like some constructor signature changed from 2.5 to 2.6, and Guice can't wire the app together, 
but I'm damned if I can't figure out what and where to fix it.

Any pointers would be appreciated.

Thanks


Jim

Greg Methvin

unread,
Aug 1, 2017, 1:13:21 AM8/1/17
to play-framework
Hi Jim,

It looks like a binary compatibility issue (as generally NoSuchMethodError is). It's trying to call the AssetsBuilder(HttpErrorHandler) constructor, but in Play 2.6 that constructor instead takes two arguments, HttpErrorHandler and AssetsMetadata. It looks like WebJarAssets in webjars-play has been updated to support it (https://github.com/webjars/webjars-play/blob/master/src/main/scala/org/webjars/play/WebJarAssets.scala#L12) but for some reason you're probably compiling against the older version written for Play 2.5.

Maybe you can try cleaning your project and trying to build again? You can also try upgrading to webjars-play 2.6.1 and see if it makes a difference.

Greg

--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/0d764fc0-f3c3-4bf9-b773-1d28e6a4805e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg Methvin
Tech Lead - Play Framework

sj

unread,
Aug 1, 2017, 12:46:05 PM8/1/17
to Play Framework
Hello Greg,

I'm having the same issue. Here's what I'm using:

build.sbt:
"org.webjars" %% "webjars-play" % "2.6.1",

plugins.sbt:
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.2")

HomeController.scala:
class HomeController @Inject() (
webJarAssets: WebJarAssets,
requireJS: RequireJS,
components: ControllerComponents)
extends AbstractController(components) {

def index = Action {
Ok(views.html.index(webJarAssets, requireJS))
}

}

views/index.scala.html:
@(webJarAssets: WebJarAssets, requireJS: org.webjars.play.RequireJS)

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='@routes.WebJarAssets.at(webJarAssets.fullPath("react", "react.js"))'></script>
<link rel='stylesheet' href='@routes.WebJarAssets.at(webJarAssets.locate("css/bootstrap.min.css"))'>
<link rel='stylesheet' href='@routes.WebJarAssets.at(webJarAssets.locate("css/font-awesome.min.css"))'>
</head>
<body>
<div id="app"></div>
<script type='text/javascript' src='@routes.Assets.versioned("javascripts/bundle.js")'></script>
</body>
</html>

routes:
# An example controller showing a sample home page
GET / home.HomeController.index

# Map static resources from the /public folder to the /assets URL path
# GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
GET /assets/*file controllers.Assets.at(file)
GET /versionedAssets/*file controllers.Assets.versioned(file)
GET /webjars/*file controllers.WebJarAssets.at(file)

application.conf:

play.assets {
path = "/public"
urlPrefix = "/assets"
}

Yet, when I load localhost:9000 in my browser, I get the following error (see below). Could you offer any advice? Thanks.




! @74omi2e30 - Internal server error, for (GET) [/] ->

play.api.UnexpectedException: Unexpected exception[ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.NoSuchMethodError: controllers.AssetsBuilder.<init>(Lplay/api/http/HttpErrorHandler;)V
  at controllers.WebJarAssets.<init>(WebJarAssets.scala:19)
  at controllers.WebJarAssets.class(WebJarAssets.scala:19)
  while locating controllers.WebJarAssets
    for the 1st parameter of home.HomeController.<init>(HomeController.scala:10)
  while locating home.HomeController
    for the 2nd parameter of router.Routes.<init>(Routes.scala:34)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router
    for the 1st parameter of play.api.http.JavaCompatibleHttpRequestHandler.<init>(HttpRequestHandler.scala:222)
  while locating play.api.http.JavaCompatibleHttpRequestHandler
  while locating play.api.http.HttpRequestHandler
    for the 6th parameter of play.api.DefaultApplication.<init>(Application.scala:236)
  at play.api.DefaultApplication.class(Application.scala:235)
  while locating play.api.DefaultApplication
  while locating play.api.Application
Caused by: java.lang.NoSuchMethodError: controllers.AssetsBuilder.<init>(Lplay/api/http/HttpErrorHandler;)V
	at controllers.WebJarAssets.<init>(WebJarAssets.scala:19)
	at controllers.WebJarAssets$$FastClassByGuice$$db4380e1.newInstance(<generated>)
	at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054) at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:409) at play.api.inject.ContextClassLoaderInjector$$anonfun$instanceOf$3.apply(Injector.scala:118) at play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:126) at play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:118) at play.api.inject.RoutesProvider$$anonfun$2.apply(BuiltinModule.scala:104) at play.api.inject.RoutesProvider$$anonfun$2.apply(BuiltinModule.scala:104) at scala.Option.fold(Option.scala:158) at play.api.inject.RoutesProvider.get$lzycompute(BuiltinModule.scala:104) at play.api.inject.RoutesProvider.get(BuiltinModule.scala:100) at play.api.inject.RoutesProvider.get(BuiltinModule.scala:99) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61) at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054) at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:409) at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:404) at play.api.inject.ContextClassLoaderInjector$$anonfun$instanceOf$2.apply(Injector.scala:117) at play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:126) at play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:117) at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:137) at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$1.apply(DevServerStart.scala:174) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$1.apply(DevServerStart.scala:171) at play.utils.Threads$.withContextClassLoader(Threads.scala:21) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1.reload(DevServerStart.scala:171) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1.get(DevServerStart.scala:124) at play.core.server.AkkaHttpServer.play$core$server$AkkaHttpServer$$modelConversion(AkkaHttpServer.scala:184) at play.core.server.AkkaHttpServer.play$core$server$AkkaHttpServer$$handleRequest(AkkaHttpServer.scala:190) at play.core.server.AkkaHttpServer$$anonfun$5.apply(AkkaHttpServer.scala:107) at play.core.server.AkkaHttpServer$$anonfun$5.apply(AkkaHttpServer.scala:107) at akka.stream.impl.fusing.MapAsync$$anon$23.onPush(Ops.scala:1172) at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:499) at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:462) at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:368) at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:571) at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:457) at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:546) at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:725) at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:740) at akka.actor.Actor$class.aroundReceive(Actor.scala:513) at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:650) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527) at akka.actor.ActorCell.invoke(ActorCell.scala:496) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) at akka.dispatch.Mailbox.run(Mailbox.scala:224) at akka.dispatch.Mailbox.exec(Mailbox.scala:234) at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) 2) Error injecting constructor, java.lang.NoSuchMethodError: controllers.AssetsBuilder.<init>(Lplay/api/http/HttpErrorHandler;)V at controllers.WebJarAssets.<init>(WebJarAssets.scala:19) at controllers.WebJarAssets.class(WebJarAssets.scala:19) while locating controllers.WebJarAssets for the 4th parameter of router.Routes.<init>(Routes.scala:34) while locating router.Routes while locating play.api.inject.RoutesProvider while locating play.api.routing.Router for the 1st parameter of play.api.http.JavaCompatibleHttpRequestHandler.<init>(HttpRequestHandler.scala:222) while locating play.api.http.JavaCompatibleHttpRequestHandler while locating play.api.http.HttpRequestHandler for the 6th parameter of play.api.DefaultApplication.<init>(Application.scala:236) at play.api.DefaultApplication.class(Application.scala:235) while locating play.api.DefaultApplication while locating play.api.Application Caused by: java.lang.NoSuchMethodError: controllers.AssetsBuilder.<init>(Lplay/api/http/HttpErrorHandler;)V at controllers.WebJarAssets.<init>(WebJarAssets.scala:19) at controllers.WebJarAssets$$FastClassByGuice$$db4380e1.newInstance(<generated>) at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054) at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:409) at play.api.inject.ContextClassLoaderInjector$$anonfun$instanceOf$3.apply(Injector.scala:118) at play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:126) at play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:118) at play.api.inject.RoutesProvider$$anonfun$2.apply(BuiltinModule.scala:104) at play.api.inject.RoutesProvider$$anonfun$2.apply(BuiltinModule.scala:104) at scala.Option.fold(Option.scala:158) at play.api.inject.RoutesProvider.get$lzycompute(BuiltinModule.scala:104) at play.api.inject.RoutesProvider.get(BuiltinModule.scala:100) at play.api.inject.RoutesProvider.get(BuiltinModule.scala:99) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81) at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61) at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:110) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054) at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:409) at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:404) at play.api.inject.ContextClassLoaderInjector$$anonfun$instanceOf$2.apply(Injector.scala:117) at play.api.inject.ContextClassLoaderInjector.withContext(Injector.scala:126) at play.api.inject.ContextClassLoaderInjector.instanceOf(Injector.scala:117) at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:137) at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$1.apply(DevServerStart.scala:174) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$1.apply(DevServerStart.scala:171) at play.utils.Threads$.withContextClassLoader(Threads.scala:21) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1.reload(DevServerStart.scala:171) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1.get(DevServerStart.scala:124) at play.core.server.AkkaHttpServer.play$core$server$AkkaHttpServer$$modelConversion(AkkaHttpServer.scala:184) at play.core.server.AkkaHttpServer.play$core$server$AkkaHttpServer$$handleRequest(AkkaHttpServer.scala:190) at play.core.server.AkkaHttpServer$$anonfun$5.apply(AkkaHttpServer.scala:107) at play.core.server.AkkaHttpServer$$anonfun$5.apply(AkkaHttpServer.scala:107) at akka.stream.impl.fusing.MapAsync$$anon$23.onPush(Ops.scala:1172) at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:499) at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:462) at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:368) at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:571) at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:457) at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:546) at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:725) at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:740) at akka.actor.Actor$class.aroundReceive(Actor.scala:513) at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:650) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527) at akka.actor.ActorCell.invoke(ActorCell.scala:496) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257) at akka.dispatch.Mailbox.run(Mailbox.scala:224) at akka.dispatch.Mailbox.exec(Mailbox.scala:234) at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) 2 errors] at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1.reload(DevServerStart.scala:186) at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1.get(DevServerStart.scala:124) at play.core.server.AkkaHttpServer.play$core$server$AkkaHttpServer$$modelConversion(AkkaHttpServer.scala:184) at play.core.server.AkkaHttpServer.play$core$server$AkkaHttpServer$$handleRequest(AkkaHttpServer.scala:190) at play.core.server.AkkaHttpServer$$anonfun$5.apply(AkkaHttpServer.scala:107) at play.core.server.AkkaHttpServer$$anonfun$5.apply(AkkaHttpServer.scala:107) at akka.stream.impl.fusing.MapAsync$$anon$23.onPush(Ops.scala:1172) at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:499) at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:462) at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:368) Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:




To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.

Greg Methvin

unread,
Aug 1, 2017, 2:50:32 PM8/1/17
to play-framework
Seems like a compatibility issue with webjars-play. You might want to report an issue there.

To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/85b07af5-33b2-45d6-a6f2-6ebca0b5265a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

sj

unread,
Aug 1, 2017, 6:16:51 PM8/1/17
to Play Framework
Thanks Greg,

In build.sbt, I changed

"org.webjars" %% "webjars-play" % "2.6.1",

to

"org.webjars" %% "webjars-play" % "2.6.0-M1",

and this has fixed the error.

Cheers,

fijimf

unread,
Aug 1, 2017, 11:10:24 PM8/1/17
to Play Framework
Using 

"org.webjars" %% "webjars-play" % "2.6.0-M1"

worked for me too:

[info] Run completed in 2 minutes, 46 seconds.
[info] Total number of tests run: 123
[info] Suites: completed 19, aborted 0
[info] Tests: succeeded 123, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[info] Passed: Total 123, Failed 0, Errors 0, Passed 123
[success] Total time: 262 s, completed Aug 1, 2017 11:06:42 PM


Process finished with exit code 0


Thanks both of you for your help

Jim

Ben Nelson

unread,
Sep 28, 2017, 3:41:38 AM9/28/17
to Play Framework
I was able to get 2.6.1 working eventually by making sure my routes matched the documentation: http://www.webjars.org/documentation
Reply all
Reply to author
Forward
0 new messages