バージョン
- Play 2.5.10 => 2.6.0
- Scala 2.11.8 => 2.12.3
出たエラー
CreationException: Unable to create injector, see the following errors:
1) Error injecting method, java.lang.NoSuchMethodError: play.api.ApplicationLoader$Context.lifecycle()Lplay/api/inject/DefaultApplicationLifecycle;
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at play.api.db.DBModule$$anonfun$$lessinit$greater$1.$anonfun$new$1(DBModule.scala:25):
Binding(interface play.api.db.Database qualified with QualifierInstance(@play.db.NamedDatabase(value=default)) to ProviderTarget(play.api.db.NamedDatabaseProvider@75442dcf)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
2) Error injecting method, java.lang.NoSuchMethodError: play.api.ApplicationLoader$Context.lifecycle()Lplay/api/inject/DefaultApplicationLifecycle;
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at play.api.cache.ehcache.EhCacheModule$$anonfun$$lessinit$greater$1.bindCache$1(EhCacheApi.scala:75):
Binding(interface net.sf.ehcache.Ehcache qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.ehcache.NamedEhCacheProvider@4a1c1017)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1) 2 errors
解決方法
2.6.5にしたら直った。(結局原因わからず)
2.6.5にしたら別のエラーが出るようになった。
別のエラー
java.lang.NoSuchMethodError: com.typesafe.sbt.web.CompileProblems$.report(Lsbt/LoggerReporter;Lscala/collection/Seq;)V
at org.irundaia.sbt.sass.SbtSassify$$anonfun$6$$anonfun$8.apply(SbtSassify.scala:116)
at org.irundaia.sbt.sass.SbtSassify$$anonfun$6$$anonfun$8.apply(SbtSassify.scala:85)
at com.typesafe.sbt.web.incremental.package$.syncIncremental(package.scala:228)
at org.irundaia.sbt.sass.SbtSassify$$anonfun$6.apply(SbtSassify.scala:133)
at org.irundaia.sbt.sass.SbtSassify$$anonfun$6.apply(SbtSassify.scala:67)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (web-assets:sassify) java.lang.NoSuchMethodError: com.typesafe.sbt.web.CompileProblems$.report(Lsbt/LoggerReporter;Lscala/collection/Seq;)V
別のエラーの解決方法
プラグインのバージョンアップで直る。
plugins.sbt
addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.10")