我使用Java 8在Windows 7上。
我试图按如下方式创建一个新的Play Framework项目:
activator new proj play-java
我在下面得到了例外。
[WARN] [11/15/2014 15:41:45.884] [default-akka.actor.default-dispatcher-3] [ActorSystem(default)] Failed to download new template catalog properties: java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\Joe\.activator\1.2.10\templates\index.db_f57d6c4e52990e27.tmp' is a directory.
[INFO] [11/15/2014 15:41:45.886] [default-akka.actor.default-dispatcher-3] [akka://default/user/template-cache] We have index hash 92e262205ed9cd3af57575198c66ca1f74dfab63 but haven't downloaded that index - attempting to download it now.
[ERROR] [11/15/2014 15:41:46.210] [default-akka.actor.default-dispatcher-3] [akka://default/user/template-cache] Could not find a template catalog. (java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\Joe\.activator\1.2.10\templates\index.db_687dfd4721d5d98b.tmp' is a directory.
java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\Joe\.activator\1.2.10\templates\index.db_687dfd4721d5d98b.tmp' is a directory.
at scala.Predef$.require(Predef.scala:219)
at sbt.IO$.copyFile(IO.scala:584)
at sbt.IO$.move(IO.scala:786)
at activator.package$RichIO$.createViaTemporary$extension(package.scala:30)
at activator.templates.repository.UriRemoteTemplateRepository$$anonfun$resolveIndexTo$1.apply(UriRemoteTemplateRepository.scala:228)
at activator.templates.repository.UriRemoteTemplateRepository$$anonfun$resolveIndexTo$1.apply(UriRemoteTemplateRepository.scala:220)
at sbt.IO$.withTemporaryDirectory(IO.scala:291)
at activator.templates.repository.UriRemoteTemplateRepository.resolveIndexTo(UriRemoteTemplateRepository.scala:220)
at activator.cache.TemplateCacheActor$$anonfun$9.apply(TemplateCacheActor.scala:165)
at activator.cache.TemplateCacheActor$$anonfun$9.apply(TemplateCacheActor.scala:163)
java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\Joe\.activator\1.2.10\templates\index.db_687dfd472
java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\Joe\.activator\1.2.10\templates\index.db_687dfd472
at scala.Option.foreach(Option.scala:245)1d5d98b.tmp' is a directory.
at activator.cache.TemplateCacheActor.preStart(TemplateCacheActor.scala:163)
at scala.Predef$.require(Predef.scala:219)
at akka.actor.Actor$class.aroundPreStart(Actor.scala:470)
at sbt.IO$.copyFile(IO.scala:584)
at activator.cache.TemplateCacheActor.aroundPreStart(TemplateCacheActor.scala:25)
at sbt.IO$.move(IO.scala:786)
at sbt.IO$.move(IO.scala:786)
at akka.actor.ActorCell.create(ActorCell.scala:580)
at activator.package$RichIO$.createViaTemporary$extension(package.scala:30)
at activator.package$RichIO$.createViaTemporary$extension(package.scala:30)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at activator.templates.repository.UriRemoteTemplateRepository$$anonfun$resolveIndexTo$1.apply(UriRemoteTemplateRepository.scala at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478):228):228)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at activator.templates.repository.UriRemoteTemplateRepository$$anonfun$resolveIndexTo$1.apply(UriRemoteTemplateRepository.scala at activator.templates.repository.UriRemoteTemplateRepository$$anonfun$resolveIndexTo$1.apply(UriRemoteTemplateRepository.scala at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393):220)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at sbt.IO$.withTemporaryDirectory(IO.scala:291)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at activator.templates.repository.UriRemoteTemplateRepository.resolveIndexTo(UriRemoteTemplateRepository.scala:220)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at activator.cache.TemplateCacheActor$$anonfun$9.apply(TemplateCacheActor.scala:165)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
at activator.cache.TemplateCacheActor$$anonfun$9.apply(TemplateCacheActor.scala:163)
at activator.cache.TemplateCacheActor$$anonfun$9.apply(TemplateCacheActr.scala:163)
at scala.Option.foreach(Option.scala:245)
at activator.cache.TemplateCacheActor.preStart(TemplateCacheActor.scala:163)
at akka.actor.Actor$class.aroundPreStart(Actor.scala:470)
at activator.cache.TemplateCacheActor.aroundPreStart(TemplateCacheActor.scala:25)
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
我下载了完整的激活器安装包。我更新了它以确保所有文件都具有权限。堆栈跟踪中的index.db_687dfd472
文件确实是一个目录,但它必须在执行命令期间创建。我删除了.activator
项目并重新运行该命令,但它仍然失败并出现相同的错误。
它已被转发到激活码问题跟踪器https://github.com/typesafehub/activator/issues/785。 我会用任何答案更新其他网站。
答案 0 :(得分:4)
tl; dr 执行activator 'reboot full'
。
reboot full
背后的想法是消灭所有本地sbt缓存并重新开始。似乎~/.sbt
目录已经损坏,不再让sbt正常运行。