Migrating from Play 2.5.3 to 2.6.6 (Java) Guice Creation Exception when trying to load application

已查看 30 次
跳至第一个未读帖子

Daniel Grant

未读,
2017年10月20日 05:04:032017/10/20
收件人 Play Framework
Getting this error when trying to migrate to 2.6.6 and making the necessary config changes per the Migration Guide. Any help would be appreciated:

1) Could not find a suitable constructor in play.api.libs.ws.ahc.AhcWSClientConfig. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at play.api.libs.ws.ahc.AhcWSClientConfig.class(AhcConfig.scala:37)
  while locating play.api.libs.ws.ahc.AhcWSClientConfig
    for the 1st parameter of play.libs.ws.ahc.AhcWSAPI.<init>(AhcWSAPI.java:28)
  at play.libs.ws.ahc.AhcWSModule.bindings(AhcWSModule.java:23):
Binding(interface play.libs.ws.WSAPI to ConstructionTarget(class play.libs.ws.ahc.AhcWSAPI)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)

1 error]
    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:183)
    at play.core.server.AkkaHttpServer.play$core$server$AkkaHttpServer$$handleRequest(AkkaHttpServer.scala:189)
    at play.core.server.AkkaHttpServer$$anonfun$5.apply(AkkaHttpServer.scala:106)
    at play.core.server.AkkaHttpServer$$anonfun$5.apply(AkkaHttpServer.scala:106)
    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.CreationException: Unable to create injector, see the following errors:

Igmar Palsenberg

未读,
2017年10月20日 05:12:372017/10/20
收件人 Play Framework
 
Getting this error when trying to migrate to 2.6.6 and making the necessary config changes per the Migration Guide. Any help would be appreciated:

1) Could not find a suitable constructor in play.api.libs.ws.ahc.AhcWSClientConfig. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at play.api.libs.ws.ahc.AhcWSClientConfig.class(AhcConfig.scala:37)
  while locating play.api.libs.ws.ahc.AhcWSClientConfig
    for the 1st parameter of play.libs.ws.ahc.AhcWSAPI.<init>(AhcWSAPI.java:28)
  at play.libs.ws.ahc.AhcWSModule.bindings(AhcWSModule.java:23):
Binding(interface play.libs.ws.WSAPI to ConstructionTarget(class play.libs.ws.ahc.AhcWSAPI)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)


Can you show the relevant code parts ?


Igmar 
回复全部
回复作者
转发
0 个新帖子