我想使用Play framework 2.3.7编译一个简单的例子,但我得到了java.lang.StringIndexOutOfBoundsException
。详细信息输出为:
[info] Compiling 7 Scala sources and 1 Java source to /home/mcor/dev/dc-eventsys-play/target/scala-2.11/classes...
[debug] Getting compiler-interface from component compiler for Scala 2.11.1
[debug] Getting compiler-interface from component compiler for Scala 2.11.1
[debug] Running cached compiler 2124a1e9, interfacing (CompilerInterface) with Scala compiler version 2.11.1
[debug] Calling Scala compiler with arguments (CompilerInterface):
[debug] -deprecation
[debug] -unchecked
[debug] -encoding
[debug] utf8
[debug] -bootclasspath
[debug] /home/mcor/dev/jdk1.8.0_11/jre/lib/resources.jar:/home/mcor/dev/jdk1.8.0_11/jre/lib/rt.jar:/home/mcor/dev/jdk1.8.0_11/jre/lib/sunrsasign.jar:/home/mcor/dev/jdk1.8.0_11/jre/lib/jsse.jar:/home/mcor/dev/jdk1.8.0_11/jre/lib/jce.jar:/home/mcor/dev/jdk1.8.0_11/jre/lib/charsets.jar:/home/mcor/dev/jdk1.8.0_11/jre/lib/jfr.jar:/home/mcor/dev/jdk1.8.0_11/jre/classes:/home/mcor/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.1.jar
[debug] -classpath
[debug] /home/mcor/dev/dc-eventsys-play/target/scala-2.11/classes:/home/mcor/.ivy2/cache/com.typesafe.play/twirl-api_2.11/jars/twirl-api_2.11-1.0.2.jar:/home/mcor/.ivy2/cache/org.apache.commons/commons-lang3/jars/commons-lang3-3.1.jar:/home/mcor/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.1.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play_2.11/jars/play_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/com.typesafe.play/build-link/jars/build-link-2.3.7.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play-exceptions/jars/play-exceptions-2.3.7.jar:/home/mcor/.ivy2/cache/org.javassist/javassist/bundles/javassist-3.18.2-GA.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play-iteratees_2.11/jars/play-iteratees_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/org.scala-stm/scala-stm_2.11/jars/scala-stm_2.11-0.7.jar:/home/mcor/.ivy2/cache/com.typesafe/config/bundles/config-1.2.1.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play-json_2.11/jars/play-json_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play-functional_2.11/jars/play-functional_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play-datacommons_2.11/jars/play-datacommons_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.3.jar:/home/mcor/.ivy2/cache/org.joda/joda-convert/jars/joda-convert-1.6.jar:/home/mcor/.ivy2/cache/com.fasterxml.jackson.core/jackson-annotations/bundles/jackson-annotations-2.3.2.jar:/home/mcor/.ivy2/cache/com.fasterxml.jackson.core/jackson-core/bundles/jackson-core-2.3.2.jar:/home/mcor/.ivy2/cache/com.fasterxml.jackson.core/jackson-databind/bundles/jackson-databind-2.3.2.jar:/home/mcor/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.1.jar:/home/mcor/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.1.jar:/home/mcor/.ivy2/cache/io.netty/netty/bundles/netty-3.9.3.Final.jar:/home/mcor/.ivy2/cache/com.typesafe.netty/netty-http-pipelining/jars/netty-http-pipelining-1.1.2.jar:/home/mcor/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.6.jar:/home/mcor/.ivy2/cache/org.slf4j/jul-to-slf4j/jars/jul-to-slf4j-1.7.6.jar:/home/mcor/.ivy2/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.7.6.jar:/home/mcor/.ivy2/cache/ch.qos.logback/logback-core/jars/logback-core-1.1.1.jar:/home/mcor/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.1.1.jar:/home/mcor/.ivy2/cache/com.typesafe.akka/akka-actor_2.11/jars/akka-actor_2.11-2.3.4.jar:/home/mcor/.ivy2/cache/com.typesafe.akka/akka-slf4j_2.11/jars/akka-slf4j_2.11-2.3.4.jar:/home/mcor/.ivy2/cache/commons-codec/commons-codec/jars/commons-codec-1.9.jar:/home/mcor/.ivy2/cache/xerces/xercesImpl/jars/xercesImpl-2.11.0.jar:/home/mcor/.ivy2/cache/xml-apis/xml-apis/jars/xml-apis-1.4.01.jar:/home/mcor/.ivy2/cache/javax.transaction/jta/jars/jta-1.1.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play-jdbc_2.11/jars/play-jdbc_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/com.jolbox/bonecp/bundles/bonecp-0.8.0.RELEASE.jar:/home/mcor/.ivy2/cache/com.h2database/h2/jars/h2-1.3.175.jar:/home/mcor/.ivy2/cache/tyrex/tyrex/jars/tyrex-1.0.1.jar:/home/mcor/.ivy2/cache/com.typesafe.play/anorm_2.11/jars/anorm_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/com.jsuereth/scala-arm_2.11/jars/scala-arm_2.11-1.4.jar:/home/mcor/.ivy2/cache/org.scala-lang.plugins/scala-continuations-library_2.11/bundles/scala-continuations-library_2.11-1.0.1.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play-cache_2.11/jars/play-cache_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/net.sf.ehcache/ehcache-core/jars/ehcache-core-2.6.8.jar:/home/mcor/.ivy2/cache/com.typesafe.play/play-ws_2.11/jars/play-ws_2.11-2.3.7.jar:/home/mcor/.ivy2/cache/com.google.guava/guava/bundles/guava-16.0.1.jar:/home/mcor/.ivy2/cache/com.ning/async-http-client/jars/async-http-client-1.8.14.jar:/home/mcor/.ivy2/cache/oauth.signpost/signpost-core/jars/signpost-core-1.2.1.2.jar:/home/mcor/.ivy2/cache/oauth.signpost/signpost-commonshttp4/jars/signpost-commonshttp4-1.2.1.2.jar:/home/mcor/.ivy2/cache/org.apache.httpcomponents/httpcore/jars/httpcore-4.0.1.jar:/home/mcor/.ivy2/cache/org.apache.httpcomponents/httpclient/jars/httpclient-4.0.1.jar:/home/mcor/.ivy2/cache/commons-logging/commons-logging/jars/commons-logging-1.1.1.jar
java.lang.StringIndexOutOfBoundsException: String index out of range: 2643
at java.lang.String.<init>(String.java:199)
at scala.reflect.internal.util.SourceFile.lineToString(SourceFile.scala:44)
at scala.reflect.internal.util.InternalPositionImpl$class.lineContent(Position.scala:168)
at scala.reflect.internal.util.Position.lineContent(Position.scala:12)
at xsbt.DelegatingReporter.makePosition(DelegatingReporter.scala:67)
at xsbt.DelegatingReporter.convert(DelegatingReporter.scala:58)
at xsbt.DelegatingReporter.info0(DelegatingReporter.scala:42)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply$mcV$sp(Reporter.scala:69)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply(Reporter.scala:69)
at scala.tools.nsc.reporters.Reporter$$anonfun$error$1.apply(Reporter.scala:69)
at scala.tools.nsc.reporters.Reporter.withoutTruncating(Reporter.scala:41)
at scala.tools.nsc.reporters.Reporter.error(Reporter.scala:69)
at scala.tools.nsc.CompilationUnits$CompilationUnit.error(CompilationUnits.scala:132)
我跳过了堆栈跟踪的剩余部分,因为它很长。任何人之前遇到过同样的问题或知道如何解决它?
$ scala -version
Scala code runner version 2.11.2 -- Copyright 2002-2013, LAMP/EPFL
$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
$ javac -version
javac 1.8.0_25
activator-1.2.12
我已经尝试恢复到最后一次提交并且它正常工作,然后我尝试添加我的更改并且它失败了。 git status show:
modified: app/controllers/Application.scala
new file: app/models/Models.scala
new file: app/views/list.scala.html
modified: conf/application.conf
modified: conf/routes