読者です 読者をやめる 読者になる 読者になる

Sphereとともに

scalaとかplayframeworkとか。技術ブログにしたいなと。環境は Windows7x64, mac です。たまに声優さん情報が混ざります。最近ちょっとClojure触りました。

playframeworkのバージョンの違いによるエラーの発生

scala playframework プログラミング

Mac 側で play2.1.2を使用して作ったものをWindows側(play2.1.1)で弄りたかったのでクローンして

play test コマンドを打ってみると以下の様なエラーが発生しました。

PS C:\Users\FScoward\Documents\Programming\Scala\NeglectfulManagement> play test
[info] Loading project definition from C:\Users\FScoward\Documents\Programming\Scala\NeglectfulManagement\project

This project uses Play 2.1.2!
Update the Play sbt-plugin version to 2.1.1 (usually in project/plugins.sbt)

[info] Set current project to NeglectfulManagement (in build file:/C:/Users/FScoward/Documents/Programming/Scala/Neglect
fulManagement/)
[info] Updating {file:/C:/Users/FScoward/Documents/Programming/Scala/NeglectfulManagement/}NeglectfulManagement...
[info] downloading http://repo.typesafe.com/typesafe/releases/play/play_2.10/2.1.2/play_2.10-2.1.2.jar ...
[info]  [SUCCESSFUL ] play#play_2.10;2.1.2!play_2.10.jar (7793ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/play/play-jdbc_2.10/2.1.2/play-jdbc_2.10-2.1.2.jar ...
[info]  [SUCCESSFUL ] play#play-jdbc_2.10;2.1.2!play-jdbc_2.10.jar (3433ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/play/anorm_2.10/2.1.2/anorm_2.10-2.1.2.jar ...
[info]  [SUCCESSFUL ] play#anorm_2.10;2.1.2!anorm_2.10.jar (1597ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/play/templates_2.10/2.1.2/templates_2.10-2.1.2.jar ...
[info]  [SUCCESSFUL ] play#templates_2.10;2.1.2!templates_2.10.jar (1177ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/play/play-iteratees_2.10/2.1.2/play-iteratees_2.10-2.1.2.j
ar ...
[info]  [SUCCESSFUL ] play#play-iteratees_2.10;2.1.2!play-iteratees_2.10.jar (1738ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/com/typesafe/netty/netty-http-pipelining/1.0.0/netty-http-
pipelining-1.0.0.jar ...
[info]  [SUCCESSFUL ] com.typesafe.netty#netty-http-pipelining;1.0.0!netty-http-pipelining.jar (1060ms)
[warn]  [NOT FOUND  ] org.slf4j#slf4j-api;1.6.6!slf4j-api.jar (0ms)
[warn] ==== local: tried
[warn]   C:\Users\FScoward\Documents\Programming\playframework\play-2.1.1\repository\local\org.slf4j\slf4j-api\1.6.6\jar
s\slf4j-api.jar
[info] downloading http://repo1.maven.org/maven2/junit/junit/4.11/junit-4.11.jar ...
[info]  [SUCCESSFUL ] junit#junit;4.11!junit.jar (289ms)
[info] downloading http://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar ...
[info]  [SUCCESSFUL ] org.hamcrest#hamcrest-core;1.3!hamcrest-core.jar (247ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/play/play-java_2.10/2.1.2/play-java_2.10-2.1.2.jar ...
[info]  [SUCCESSFUL ] play#play-java_2.10;2.1.2!play-java_2.10.jar (2740ms)
[info] downloading http://repo.typesafe.com/typesafe/releases/play/play-test_2.10/2.1.2/play-test_2.10-2.1.2.jar ...
[info]  [SUCCESSFUL ] play#play-test_2.10;2.1.2!play-test_2.10.jar (1554ms)
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.slf4j#slf4j-api;1.6.6!slf4j-api.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: download failed: org.slf4j#slf4j-api;1.6.6!slf4j-api.jar
        at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
        at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
        at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:114)
        at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:114)
        at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:102)
        at sbt.IvySbt.liftedTree1$1(Ivy.scala:49)
        at sbt.IvySbt.action$1(Ivy.scala:49)
        at sbt.IvySbt$$anon$3.call(Ivy.scala:58)
        at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:75)
        at xsbt.boot.Locks$GlobalLock.withChannelRetries$1(Locks.scala:58)
        at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:79)
        at xsbt.boot.Using$.withResource(Using.scala:11)
        at xsbt.boot.Using$.apply(Using.scala:10)
        at xsbt.boot.Locks$GlobalLock.liftedTree1$1(Locks.scala:51)
        at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:51)
        at xsbt.boot.Locks$.apply0(Locks.scala:30)
        at xsbt.boot.Locks$.apply(Locks.scala:27)
        at sbt.IvySbt.withDefaultLogger(Ivy.scala:58)
        at sbt.IvySbt.withIvy(Ivy.scala:99)
        at sbt.IvySbt.withIvy(Ivy.scala:95)
        at sbt.IvySbt$Module.withModule(Ivy.scala:114)
        at sbt.IvyActions$.update(IvyActions.scala:121)
        at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:951)
        at sbt.Classpaths$$anonfun$work$1$1.apply(Defaults.scala:949)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$54.apply(Defaults.scala:972)
        at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$54.apply(Defaults.scala:970)
        at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:974)
        at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:969)
        at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
        at sbt.Classpaths$.cachedUpdate(Defaults.scala:977)
        at sbt.Classpaths$$anonfun$45.apply(Defaults.scala:856)
        at sbt.Classpaths$$anonfun$45.apply(Defaults.scala:853)
        at sbt.Scoped$$anonfun$hf10$1.apply(Structure.scala:586)
        at sbt.Scoped$$anonfun$hf10$1.apply(Structure.scala:586)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49)
        at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
        at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41)
        at sbt.std.Transform$$anon$5.work(System.scala:71)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.Execute.work(Execute.scala:238)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: download failed: org.slf4j#slf4j-api;1.6.6!slf4j-api.jar
[error] Total time: 48 s, completed 2013/07/15 15:31:58

問題は

(*:update) sbt.ResolveException: download failed: org.slf4j#slf4j-api;1.6.6!slf4j-api.jar

の一文

どうすれば解決すればいいかと色々ググってみると

playframework のインストールフォルダ以下の repository\local\org.slf4j を一旦消してもう一回やると上手く行くという記述を発見

かといって、消してしまうのもコワイので、_org.slf4jとリネームして再度実行

あら不思議!上手くいきました

新しくフォルダできてんのかなー?と再度先ほどのフォルダを見てみると、特にそういうことはありませんでした(・・・?どうなってんだろう?)

Scalaスケーラブルプログラミング第2版

Scalaスケーラブルプログラミング第2版