4

初めて localhost:9000 にアクセスするとエラーが発生します。これは私の最初の 'play run' コマンドです。私はプレイフレームワークが初めてで、ブラウザには次のように書かれています:問題を報告せずにコンパイルに失敗しました!?.

コントローラのコードはデフォルトです:

  public class Application extends Controller {

   public static Result index() {
             return ok(index.render("Your new application is ready."));
   }

}

プレイ2.0のバージョン。

ログファイルのスタックトレースは次のとおりです。

    2012-06-22 10:25:29,937 - [INFO] - from play in main 
    Listening for HTTP on port 9001...

    2012-06-22 10:25:43,292 - [ERROR] - from application in New I/O server worker #1-1 
    ! Internal server error, for request [GET /] ->
    play.api.UnexpectedException: Unexpected exception [Compilation failed without reporting any problem!?]
    at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11$$anonfun$apply$13.apply(PlayReloade  r.scala:225) ~[na:na]
    at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11$$anonfun$apply$13.apply(PlayReloade  r.scala:225) ~[na:na]
    at scala.Option.getOrElse(Option.scala:108) ~[scala-library.jar:0.11.2]
    at sbt.PlayReloader$$anon$2$$anonfun$reload$3$$anonfun$2$$anonfun$apply$11.apply(PlayReloader.scala:224) ~   [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]
    at sbt.PlayReloader$$anon$2$$anonfun$reload$3.apply(PlayReloader.scala:219) ~[na:na]
    at sbt.PlayReloader$$anon$2$$anonfun$reload$3.apply(PlayReloader.scala:214) ~[na:na]
    at scala.Option.getOrElse(Option.scala:108) ~[scala-library.jar:0.11.2]
    at sbt.PlayReloader$$anon$2.reload(PlayReloader.scala:214) ~[na:na]
    at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:110) ~[play_2.9.1.jar:2.0]
    at play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:110) ~[play_2.9.1.jar:2.0]
    at akka.dispatch.Future$$anon$3.liftedTree1$1(Future.scala:195) ~[akka-actor.jar:2.0]
    at akka.dispatch.Future$$anon$3.run(Future.scala:194) ~[akka-actor.jar:2.0]
    at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:83) ~[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1381) ~[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259) ~[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:997) ~[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1495) ~[akka-actor.jar:2.0]
    at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) ~[akka-actor.jar:2.0]
sbt.compiler.CompileFailed: null
    at sbt.compiler.JavaCompiler$$anon$1.apply(JavaCompiler.scala:26) ~[na:na]
    at sbt.AggressiveCompile$$anonfun$5$$anonfun$compileJava$1$1.apply$mcV$sp(AggressiveCompile.scala:76) ~[na:na]
    at sbt.classfile.Analyze$.apply(Analyze.scala:93) ~[na:na]
    at sbt.AggressiveCompile$$anonfun$5.compileJava$1(AggressiveCompile.scala:75) ~[na:na]
    at sbt.AggressiveCompile$$anonfun$5.apply(AggressiveCompile.scala:79) ~[na:na]
    at sbt.AggressiveCompile$$anonfun$5.apply(AggressiveCompile.scala:57) ~[na:na]
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:21) ~[na:na]
    at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:19) ~[na:na]
    at sbt.inc.Incremental$.cycle(Incremental.scala:33) ~[na:na]
    at sbt.inc.Incremental$.compile(Incremental.scala:20) ~[na:na]
    at sbt.inc.IncrementalCompile$.apply(Compile.scala:17) ~[na:na]
    at sbt.AggressiveCompile.compile2(AggressiveCompile.scala:87) ~[na:na]
    at sbt.AggressiveCompile.compile1(AggressiveCompile.scala:41) ~[na:na]
    at sbt.AggressiveCompile.apply(AggressiveCompile.scala:28) ~[na:na]
    at sbt.Compiler$.apply(Compiler.scala:107) ~[na:na]
    at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:479) ~[na:na]
    at sbt.Defaults$$anonfun$compileTask$1.apply(Defaults.scala:479) ~[na:na]
    at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:473) ~[na:na]
    at sbt.Scoped$$anonfun$hf2$1.apply(Structure.scala:473) ~[na:na]
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:41) ~[scala-library.jar:0.11.2]
    at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$11.apply(Structure.scala:295) ~[na:na]
    at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$11.apply(Structure.scala:295) ~[na:na]
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40) ~[na:na]
    at sbt.std.Transform$$anon$5.work(System.scala:67) ~[na:na]
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:221) ~[na:na]
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:221) ~[na:na]
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18) ~[na:na]
    at sbt.Execute.work(Execute.scala:227) ~[na:na]
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:221) ~[na:na]
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:221) ~[na:na]
    at sbt.CompletionService$$anon$1$$anon$2.call(CompletionService.scala:26) ~[na:na]
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) ~[na:1.7.0_01]
    at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.7.0_01]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[na:1.7.0_01]
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) ~[na:1.7.0_01]
    at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.7.0_01]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_01]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_01]
    at java.lang.Thread.run(Unknown Source) [na:1.7.0_01]
4

2 に答える 2

1

別の異なる Java バージョンを使用している可能性があります。プロジェクト A を作成し、Java 6 を使用してコンパイルしました。Java を 7 に更新しました。問題が発生しました。次に、Java 6 を使用して実行します。問題が処理されました。

しかし、Java7で実行する方法がわかりません。クリーンアップコンパイルを試みましたが、失敗しました。他の方法を試してみましょう!

于 2013-07-19T09:32:33.697 に答える
0

行ってみましたhttp://localhost:9001か?あなたのサーバーはListening for HTTP on port 9001...正しいので、これは正しい道かもしれません; )。

于 2012-06-22T06:51:23.960 に答える