播放框架2.0-意外的异常-找不到密钥:源 [英] play framework 2.0 - unexpected exception - Key Not Found : Source

查看:74
本文介绍了播放框架2.0-意外的异常-找不到密钥:源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试启动我的Play 2.0应用时,我收到未找到密钥的错误消息.实际上,我认为我没有进行任何更改,并且此错误刚刚出现.其实我做了一件事.我打开了target/scala-2.9.1/src_managed/main文件夹中的文件,然后将其关闭(我没有做任何更改,也没有保存或删除文件).但是在重新加载应用程序后,出现了此错误.知道我能做什么吗?

I'm getting a key not found error message while trying to start my Play 2.0 app. I actually think that I did not change anything, and this error just popped-up. Actually I did one thing. I opened the files in the folder target/scala-2.9.1/src_managed/main and closed it (I did not changed anything, nor saved or deleted a file). But after reloading the app I got this error. Any idea what I can do?

[info]播放-在端口9000上侦听HTTP ...

[info] play - Listening for HTTP on port 9000...

(服务器已启动,请使用Ctrl + D停止并返回控制台...)

(Server started, use Ctrl+D to stop and go back to the console...)

[错误] {file:/Volumes/INPROG/03_Projects/06_Play_Applications/Space-for-Art//Space-for-Art/compile:sources: java.util.NoSuchElementException:找不到键:SOURCE [错误] 应用程序-

[error] {file:/Volumes/INPROG/03_Projects/06_Play_Applications/Space-for-Art/}Space-for-Art/compile:sources: java.util.NoSuchElementException: key not found: SOURCE [error] application -

!服务器内部错误,请求[GET/]->

! Internal server error, for request [GET /] ->

play.api.UnexpectedException:意外的异常 [NoSuchElementException:找不到密钥:SOURCE]位于 sbt.PlayReloader $$ anon $ 2 $$ anonfun $ reload $ 3 $ anonfun $ 2 $ anonfun $ apply $ 11.apply(PlayReloader.scala:228) 〜[na:na]在 sbt.PlayReloader $$ anon $ 2 $ anonfun $ reload $ 3 $ anonfun $ 2 $ anonfun $ apply $ 11.apply(PlayReloader.scala:221) 〜[na:na]在scala.Option.map(Option.scala:133) 〜[scala-library.jar:0.11.2]在 sbt.PlayReloader $$ anon $ 2 $$ anonfun $ reload $ 3 $$ anonfun $ 2.apply(PlayReloader.scala:221) 〜[na:na]在 sbt.PlayReloader $$ anon $ 2 $$ anonfun $ reload $ 3 $$ anonfun $ 2.apply(PlayReloader.scala:219) 〜[na:na]在scala.Either $ LeftProjection.map(Either.scala:183) 〜[scala-library.jar:0.11.2] java.util.NoSuchElementException:密钥不 找到:来源: scala.collection.MapLike $ class.default(MapLike.scala:224) 〜[scala-library.jar:0.11.2]在 scala.collection.immutable.Map $ EmptyMap $ .default(Map.scala:87) 〜[scala-library.jar:0.11.2]在 scala.collection.MapLike $ class.apply(MapLike.scala:135) 〜[scala-library.jar:0.11.2]在 scala.collection.immutable.Map $ EmptyMap $ .apply(Map.scala:87) 〜[scala-library.jar:0.11.2]在 play.templates.GeneratedSource.source(ScalaTemplates.scala:145) 〜[templates_2.9.1.jar:2.0]在 play.templates.GeneratedSource.sync(ScalaTemplates.scala:154) 〜[templates_2.9.1.jar:2.0]

play.api.UnexpectedException: Unexpected exception [NoSuchElementException: key not found: SOURCE] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11.apply(PlayReloader.scala:228) ~[na:na] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11.apply(PlayReloader.scala:221) ~[na:na] at scala.Option.map(Option.scala:133) ~[scala-library.jar:0.11.2] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2.apply(PlayReloader.scala:221) ~[na:na] at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2.apply(PlayReloader.scala:219) ~[na:na] at scala.Either$LeftProjection.map(Either.scala:183) ~[scala-library.jar:0.11.2] java.util.NoSuchElementException: key not found: SOURCE at scala.collection.MapLike$class.default(MapLike.scala:224) ~[scala-library.jar:0.11.2] at scala.collection.immutable.Map$EmptyMap$.default(Map.scala:87) ~[scala-library.jar:0.11.2] at scala.collection.MapLike$class.apply(MapLike.scala:135) ~[scala-library.jar:0.11.2] at scala.collection.immutable.Map$EmptyMap$.apply(Map.scala:87) ~[scala-library.jar:0.11.2] at play.templates.GeneratedSource.source(ScalaTemplates.scala:145) ~[templates_2.9.1.jar:2.0] at play.templates.GeneratedSource.sync(ScalaTemplates.scala:154) ~[templates_2.9.1.jar:2.0]

推荐答案

执行

play clean update

刷新编译的文件.然后运行:

to refresh the compiled files. And then run:

play run

那应该解决

这篇关于播放框架2.0-意外的异常-找不到密钥:源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆