玩 2.6.13 有问题 运行 Scaldi
Play 2.6.13 having trouble running with Scaldi
我尝试将使用 Scaldi 注入的应用程序从 Play 2.6.12 升级到 Play 2.6.13。在所有应用程序中,我们 运行 遇到了同样的问题。
它试图实例化类型为“$$anon$1”或 'play.api.inject.BindingKey$$anon@5d807417' 的对象。这个类型显然是不存在的,所以它确实会导致 Stack down 出错。
java.lang.ArrayIndexOutOfBoundsException: 1
at java.lang.reflect.Executable.getAllGenericParameterTypes(Executable.java:318)
at java.lang.reflect.Parameter.getParameterizedType(Parameter.java:201)
at scala.reflect.runtime.JavaMirrors$JavaMirror.$anonfun$jparamsAsScala(JavaMirrors.scala:1209)
at scala.reflect.runtime.JavaMirrors$JavaMirror.jparamsAsScala(JavaMirrors.scala:1203)
at scala.reflect.runtime.JavaMirrors$JavaMirror.jconstrAsScala1(JavaMirrors.scala:1190)
at scala.reflect.runtime.JavaMirrors$JavaMirror.$anonfun$jconstrAsScala(JavaMirrors.scala:1182)
at scala.reflect.runtime.JavaMirrors$JavaMirror.$anonfun$toScala(JavaMirrors.scala:98)
at scala.reflect.runtime.TwoWayCaches$TwoWayCache.$anonfun$toScala(TwoWayCaches.scala:38)
at scala.reflect.runtime.TwoWayCaches$TwoWayCache.toScala(TwoWayCaches.scala:34)
at scala.reflect.runtime.JavaMirrors$JavaMirror.toScala(JavaMirrors.scala:96)
at scala.reflect.runtime.JavaMirrors$JavaMirror.scala$reflect$runtime$JavaMirrors$JavaMirror$$jconstrAsScala(JavaMirrors.scala:1182)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter.$anonfun$completeRest(JavaMirrors.scala:789)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter.$anonfun$completeRest(JavaMirrors.scala:789)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter.$anonfun$completeRest(JavaMirrors.scala:797)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter.completeRest(JavaMirrors.scala:755)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter$LazyPolyType.complete(JavaMirrors.scala:804)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1535)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol$$anon.scala$reflect$runtime$SynchronizedSymbols$SynchronizedSymbol$$super$info(SynchronizedSymbols.scala:173)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol.$anonfun$info(SynchronizedSymbols.scala:129)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol.info(SynchronizedSymbols.scala:125)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol.info$(SynchronizedSymbols.scala:129)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol$$anon.info(SynchronizedSymbols.scala:173)
at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2304)
at scaldi.jsr330.AnnotationBinding.<init>(AnnotationBinding.scala:47)
at scaldi.play.ScaldiBuilder$.$anonfun$toScaldiBindings(ScaldiBuilder.scala:210)
at scala.collection.immutable.List.map(List.scala:283)
at scaldi.play.ScaldiBuilder$.$anonfun$toScaldiBindings(ScaldiBuilder.scala:190)
at scaldi.SimpleContainerInjector.preparedBindings$lzycompute(Module.scala:376)
at scaldi.SimpleContainerInjector.preparedBindings(Module.scala:376)
at scaldi.SimpleContainerInjector.init(Module.scala:392)
at scaldi.Initializeable.partialInit(Injector.scala:299)
at scaldi.Initializeable.partialInit$(Injector.scala:297)
at scaldi.SimpleContainerInjector.partialInit(Module.scala:375)
at scaldi.MutableInjectorAggregation.$anonfun$init(Injector.scala:219)
at scala.collection.immutable.List.flatMap(List.scala:335)
at scaldi.MutableInjectorAggregation.init(Injector.scala:218)
at scaldi.Initializeable.partialInit(Injector.scala:299)
at scaldi.Initializeable.partialInit$(Injector.scala:297)
at scaldi.MutableInjectorAggregation.partialInit(Injector.scala:177)
at scaldi.Initializeable.initNonLazy(Injector.scala:284)
at scaldi.Initializeable.initNonLazy$(Injector.scala:284)
at scaldi.MutableInjectorAggregation.initNonLazy(Injector.scala:177)
at scaldi.play.ScaldiBuilder$.createScaldiInjector(ScaldiBuilder.scala:151)
at scaldi.play.ScaldiBuilder.createInjector(ScaldiBuilder.scala:96)
at scaldi.play.ScaldiApplicationBuilder.realInjector(ScaldiApplicationBuilder.scala:72)
at scaldi.play.ScaldiApplicationBuilder.build(ScaldiApplicationBuilder.scala:80)
at muneris.console.ui.ApplicationLoader.load(ApplicationLoader.scala:35)
at play.core.server.DevServerStart$$anon.$anonfun$reload(DevServerStart.scala:174)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.core.server.DevServerStart$$anon.reload(DevServerStart.scala:171)
这似乎是在加载环境 class 时发生的。这里有没有人知道它可能是什么?
我 运行 遇到了完全相同的问题,发现这是由于 build.sbt (scala v2.12.6) 中升级 scala 版本引起的。
我将 scala 降级到 v2.12.4,它运行良好。
我尝试将使用 Scaldi 注入的应用程序从 Play 2.6.12 升级到 Play 2.6.13。在所有应用程序中,我们 运行 遇到了同样的问题。
它试图实例化类型为“$$anon$1”或 'play.api.inject.BindingKey$$anon@5d807417' 的对象。这个类型显然是不存在的,所以它确实会导致 Stack down 出错。
java.lang.ArrayIndexOutOfBoundsException: 1
at java.lang.reflect.Executable.getAllGenericParameterTypes(Executable.java:318)
at java.lang.reflect.Parameter.getParameterizedType(Parameter.java:201)
at scala.reflect.runtime.JavaMirrors$JavaMirror.$anonfun$jparamsAsScala(JavaMirrors.scala:1209)
at scala.reflect.runtime.JavaMirrors$JavaMirror.jparamsAsScala(JavaMirrors.scala:1203)
at scala.reflect.runtime.JavaMirrors$JavaMirror.jconstrAsScala1(JavaMirrors.scala:1190)
at scala.reflect.runtime.JavaMirrors$JavaMirror.$anonfun$jconstrAsScala(JavaMirrors.scala:1182)
at scala.reflect.runtime.JavaMirrors$JavaMirror.$anonfun$toScala(JavaMirrors.scala:98)
at scala.reflect.runtime.TwoWayCaches$TwoWayCache.$anonfun$toScala(TwoWayCaches.scala:38)
at scala.reflect.runtime.TwoWayCaches$TwoWayCache.toScala(TwoWayCaches.scala:34)
at scala.reflect.runtime.JavaMirrors$JavaMirror.toScala(JavaMirrors.scala:96)
at scala.reflect.runtime.JavaMirrors$JavaMirror.scala$reflect$runtime$JavaMirrors$JavaMirror$$jconstrAsScala(JavaMirrors.scala:1182)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter.$anonfun$completeRest(JavaMirrors.scala:789)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter.$anonfun$completeRest(JavaMirrors.scala:789)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter.$anonfun$completeRest(JavaMirrors.scala:797)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter.completeRest(JavaMirrors.scala:755)
at scala.reflect.runtime.JavaMirrors$JavaMirror$FromJavaClassCompleter$LazyPolyType.complete(JavaMirrors.scala:804)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1535)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol$$anon.scala$reflect$runtime$SynchronizedSymbols$SynchronizedSymbol$$super$info(SynchronizedSymbols.scala:173)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol.$anonfun$info(SynchronizedSymbols.scala:129)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol.info(SynchronizedSymbols.scala:125)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol.info$(SynchronizedSymbols.scala:129)
at scala.reflect.runtime.SynchronizedSymbols$SynchronizedSymbol$$anon.info(SynchronizedSymbols.scala:173)
at scala.reflect.internal.Types$TypeRef.baseClasses(Types.scala:2304)
at scaldi.jsr330.AnnotationBinding.<init>(AnnotationBinding.scala:47)
at scaldi.play.ScaldiBuilder$.$anonfun$toScaldiBindings(ScaldiBuilder.scala:210)
at scala.collection.immutable.List.map(List.scala:283)
at scaldi.play.ScaldiBuilder$.$anonfun$toScaldiBindings(ScaldiBuilder.scala:190)
at scaldi.SimpleContainerInjector.preparedBindings$lzycompute(Module.scala:376)
at scaldi.SimpleContainerInjector.preparedBindings(Module.scala:376)
at scaldi.SimpleContainerInjector.init(Module.scala:392)
at scaldi.Initializeable.partialInit(Injector.scala:299)
at scaldi.Initializeable.partialInit$(Injector.scala:297)
at scaldi.SimpleContainerInjector.partialInit(Module.scala:375)
at scaldi.MutableInjectorAggregation.$anonfun$init(Injector.scala:219)
at scala.collection.immutable.List.flatMap(List.scala:335)
at scaldi.MutableInjectorAggregation.init(Injector.scala:218)
at scaldi.Initializeable.partialInit(Injector.scala:299)
at scaldi.Initializeable.partialInit$(Injector.scala:297)
at scaldi.MutableInjectorAggregation.partialInit(Injector.scala:177)
at scaldi.Initializeable.initNonLazy(Injector.scala:284)
at scaldi.Initializeable.initNonLazy$(Injector.scala:284)
at scaldi.MutableInjectorAggregation.initNonLazy(Injector.scala:177)
at scaldi.play.ScaldiBuilder$.createScaldiInjector(ScaldiBuilder.scala:151)
at scaldi.play.ScaldiBuilder.createInjector(ScaldiBuilder.scala:96)
at scaldi.play.ScaldiApplicationBuilder.realInjector(ScaldiApplicationBuilder.scala:72)
at scaldi.play.ScaldiApplicationBuilder.build(ScaldiApplicationBuilder.scala:80)
at muneris.console.ui.ApplicationLoader.load(ApplicationLoader.scala:35)
at play.core.server.DevServerStart$$anon.$anonfun$reload(DevServerStart.scala:174)
at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
at play.core.server.DevServerStart$$anon.reload(DevServerStart.scala:171)
这似乎是在加载环境 class 时发生的。这里有没有人知道它可能是什么?
我 运行 遇到了完全相同的问题,发现这是由于 build.sbt (scala v2.12.6) 中升级 scala 版本引起的。 我将 scala 降级到 v2.12.4,它运行良好。