Я просто перешел с 2.3 на 2.4. Само приложение, похоже, работает, но ни один из тестов не будет работать. Они все неудачно со следующей ошибкой:Ошибка при выполнении тестов в Play Framework после перехода на 2.4.x (Java)
[error] Test models.TestCountry.createTheater failed: com.google.inject.ProvisionException: Unable to provision, see the following errors:
[error]
[error] 1) Error injecting constructor, java.lang.IllegalStateException: Got deeper than 5 levels while searching /home/jlei/workspace/ebor-play/target/web/classes/main/META-INF/resources/webjars
[error] at controllers.WebJarAssets.<init>(WebJarAssets.scala:21)
[error] at controllers.WebJarAssets.class(WebJarAssets.scala:21)
[error] while locating controllers.WebJarAssets
[error] for parameter 18 at router.Routes.<init>(Routes.scala:96)
[error] while locating router.Routes
[error] while locating play.api.test.FakeRouterProvider
[error] while locating play.api.routing.Router
[error]
[error] 1 error, took 2.828 sec
[error] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
[error] at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
[error] at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:321)
[error] at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:316)
[error] at play.api.Application$class.routes(Application.scala:111)
[error] at play.api.test.FakeApplication.routes(Fakes.scala:197)
[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:450)
[error] at play.test.WithApplication.startPlay(WithApplication.java:44)
[error] ...
[error] Caused by: java.lang.IllegalStateException: Got deeper than 5 levels while searching /home/jlei/workspace/ebor-play/target/web/classes/main/META-INF/resources/webjars
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.aggregateChildren(FileUrlProtocolHandler.java:43)
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.aggregateChildren(FileUrlProtocolHandler.java:47)
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.aggregateChildren(FileUrlProtocolHandler.java:47)
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.aggregateChildren(FileUrlProtocolHandler.java:47)
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.aggregateChildren(FileUrlProtocolHandler.java:47)
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.aggregateChildren(FileUrlProtocolHandler.java:47)
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.aggregateChildren(FileUrlProtocolHandler.java:47)
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.listFiles(FileUrlProtocolHandler.java:36)
[error] at org.webjars.urlprotocols.FileUrlProtocolHandler.getAssetPaths(FileUrlProtocolHandler.java:25)
[error] at org.webjars.WebJarAssetLocator.getAssetPaths(WebJarAssetLocator.java:89)
[error] at org.webjars.WebJarAssetLocator.getFullPathIndex(WebJarAssetLocator.java:119)
[error] at controllers.WebJarAssets.<init>(WebJarAssets.scala:29)
[error] at controllers.WebJarAssets$$FastClassByGuice$$db4380e1.newInstance(<generated>)
[error] at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
[error] at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
[error] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
[error] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
[error] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
[error] at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
[error] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
[error] at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
[error] at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
[error] at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
[error] at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
[error] at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
[error] at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)
[error] at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
[error] at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
[error] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
[error] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
[error] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
[error] at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
[error] at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:321)
[error] at play.api.inject.RoutesProvider$$anonfun$2.apply(BuiltinModule.scala:67)
[error] at play.api.inject.RoutesProvider$$anonfun$2.apply(BuiltinModule.scala:67)
[error] at scala.Option.fold(Option.scala:158)
[error] at play.api.inject.RoutesProvider.get$lzycompute(BuiltinModule.scala:67)
[error] at play.api.inject.RoutesProvider.get(BuiltinModule.scala:63)
[error] at play.api.test.FakeRouterProvider.get$lzycompute(Fakes.scala:259)
[error] at play.api.test.FakeRouterProvider.get(Fakes.scala:259)
[error] at play.api.test.FakeRouterProvider.get(Fakes.scala:258)
[error] at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
[error] at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
[error] at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
[error] at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
[error] at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
[error] at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
[error] at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
[error] ... 44 more
[error] Failed: Total 1, Failed 1, Errors 0, Passed 0
Я использую InjectedRoutesGenerator и версию 2.4.0-M3-1 из webjars-игры. Дайте мне знать, если есть какие-то другие детали, которые могут помочь!
Кто-нибудь знает, что может быть?
EDIT:
Выкопанные это вверх: https://github.com/sbt/sbt-web/issues/104
Так, кажется, известная проблема. Думаю, я буду пытаться найти творческий обходной путь в то же время ...
У меня есть некоторые файлы javascript, которые имеют более 5 уровней глубины ... Наверное, я просто не понимаю, почему это незаконная вещь? –