使用Play 2(2.0RC3)下载了typesafe 2.0
ra g8 typesafehub / play-scala也是g8 typesafehub / play-java(两者都做同样的事)
一切都好,然后sbt run
所有看起来都没问题,出现在端口9000上。但是当我进入网页时,我得到了一个例外:
[error] {file:/C:/typesafe2/my_app_scala/}my_app_scala/compile:sources: java.lan
g.ExceptionInInitializerError
[error] application -
! Internal server error, for request [GET /] ->
play.api.UnexpectedException: Unexpected exception [ExceptionInInitializerError:
null]
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(PlayReloa
der.scala:221) ~[na:na]
at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2.apply(PlayReloa
der.scala:219) ~[na:na]
at scala.Either$LeftProjection.map(Either.scala:183) ~[scala-library.jar
:0.11.2]
java.lang.ExceptionInInitializerError: null
at play.templates.ScalaTemplateCompiler$TemplateAsFunctionCompiler$.getF
unctionMapping(ScalaTemplates.scala:561) ~[templates_2.9.1-2.0-RC3.jar:2.0-RC3]
at play.templates.ScalaTemplateCompiler$.generateFinalTemplate(ScalaTemp
lates.scala:500) ~[templates_2.9.1-2.0-RC3.jar:2.0-RC3]
at play.templates.ScalaTemplateCompiler$.compile(ScalaTemplates.scala:18
9) ~[templates_2.9.1-2.0-RC3.jar:2.0-RC3]
at sbt.PlayCommands$$anonfun$48$$anonfun$apply$38.apply(PlayCommands.sca
la:533) ~[na:na]
at sbt.PlayCommands$$anonfun$48$$anonfun$apply$38.apply(PlayCommands.sca
la:531) ~[na:na]
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.
scala:60) ~[scala-library.jar:0.11.2]
Caused by: scala.tools.nsc.MissingRequirementError: object scala not found.
at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Defi
nitions.scala:655) ~[scala-compiler.jar:na]
at scala.tools.nsc.symtab.Definitions$definitions$.getModule(Definitions
.scala:605) ~[scala-compiler.jar:na]
at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definiti
ons.scala:145) ~[scala-compiler.jar:na]
at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Def
initions.scala:146) ~[scala-compiler.jar:na]
at scala.tools.nsc.symtab.Definitions$definitions$.AnyClass(Definitions.
scala:176) ~[scala-compiler.jar:na]
at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scal
a:814) ~[scala-compiler.jar:na]
有什么想法吗? Scala看起来很好,我可以g8 typesafehub / scala-sbt和g8 typesafehub / akka-scala-sbt没问题
感谢。