webjars / webjars-play

MIT License
80 stars 34 forks source link

Incompatibility with play 2.4.0-M3 and routesGenerator := InjectedRoutesGenerator #51

Closed davidillsley closed 9 years ago

davidillsley commented 9 years ago

When I try to use webjars with Play/Java and routesGenerator := InjectedRoutesGenerator as described in https://www.playframework.com/documentation/2.4.x/Migration24 I get:

[error] 1) Could not find a suitable constructor in controllers.WebJarAssets. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
[error]   at controllers.WebJarAssets.class(WebJarAssets.scala:18)
[error]   while locating controllers.WebJarAssets
[error]     for parameter 3 at Routes.<init>(routes_routing.scala:36)
[error]   while locating Routes
[error]   while locating play.api.test.FakeRouterProvider
[error]   while locating play.api.routing.Router
[error] 
[error] 1 error, took 0.044 sec
[error]     at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
[error]     at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
[error]     at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:314)
[error]     at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:309)
[error]     at play.api.Application$class.routes(Application.scala:103)
[error]     at play.api.test.FakeApplication.routes(Fakes.scala:201)
[error]     at play.api.Play$.start(Play.scala:89)
[error]     at play.api.Play.start(Play.scala)
[error]     at play.test.Helpers.start(Helpers.java:455)
[error]     at play.test.Helpers.running(Helpers.java:471)
jamesward commented 9 years ago

2.4.0-M3-1 will be released shortly with the fix for this.

asheshambasta commented 9 years ago

This isn't fixed.

jamesward commented 9 years ago

What version of webjars-play are you using? The sample project seems to be working fine. What is the problem you are having?

vikash002 commented 9 years ago

I am getting same problem please provide me solution for this .

jamesward commented 9 years ago

@vikash002 Are you using the latest version of this library? What version of Play? Can you provide any error messages you are getting?

vikash002 commented 9 years ago

No my issue is now solved thanks On Oct 28, 2015 6:33 PM, "James Ward" notifications@github.com wrote:

@vikash002 https://github.com/vikash002 Are you using the latest version of this library? What version of Play? Can you provide any error messages you are getting?

— Reply to this email directly or view it on GitHub https://github.com/webjars/webjars-play/issues/51#issuecomment-151837318 .