2016-04-24 15 views
0

したがって、私はplay 2 framework + slickを勉強します。コードは、slickでdbに簡単なクエリです。そして例外を得る。そして私は何をすべきか理解していません。Scala Play 2フレームワーク:PrivilegedActionException:null

私のコントローラ:

class IndexController @Inject()(taskRepo: TaskRepo) extends Controller { 
    def index = Action.async { implicit rs => 
    taskRepo.all().map(tasks => Ok(views.html.index(tasks))) 
    } 
} 

と例外:

[info] ! @6pp163f7m - Internal server error, for (GET) [/] -> 
[info] 
[info] play.api.http.HttpErrorHandlerExceptions$$anon$1: Execution exception[[PrivilegedActionException: null]] 
[info] at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:269) 
[info] at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:195) 
[info] at play.core.server.Server$class.logExceptionAndGetResult$1(Server.scala:45) 
[info] at play.core.server.Server$class.getHandlerFor(Server.scala:65) 
[info] at play.core.server.NettyServer.getHandlerFor(NettyServer.scala:45) 
[info] at play.core.server.netty.PlayRequestHandler.handle(PlayRequestHandler.scala:81) 
[info] at play.core.server.netty.PlayRequestHandler.channelRead(PlayRequestHandler.scala:162) 
[info] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:307) 
[info] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:293) 
[info] at com.typesafe.netty.http.HttpStreamsHandler.channelRead(HttpStreamsHandler.java:129) 
[info] Caused by: java.security.PrivilegedActionException: null 
[info] at java.security.AccessController.doPrivileged(Native Method) 
[info] at play.runsupport.Reloader$.play$runsupport$Reloader$$withReloaderContextClassLoader(Reloader.scala:39) 
[info] at play.runsupport.Reloader.reload(Reloader.scala:336) 
[info] at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:118) 
[info] at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:116) 
[info] at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) 
[info] at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) 
[info] at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) 
[info] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) 
[info] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) 
[info] Caused by: java.util.concurrent.TimeoutException: Futures timed out after [300000 milliseconds] 
[info] at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219) 
[info] at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223) 
[info] at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:190) 
[info] at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53) 
[info] at scala.concurrent.Await$.result(package.scala:190) 
[info] at play.forkrun.ForkRun$$anonfun$askForReload$1.apply(ForkRun.scala:128) 
[info] at play.forkrun.ForkRun$$anonfun$askForReload$1.apply(ForkRun.scala:126) 
[info] at play.runsupport.Reloader$$anonfun$reload$1.apply(Reloader.scala:338) 
[info] at play.runsupport.Reloader$$anon$3.run(Reloader.scala:43) 
[info] at java.security.AccessController.doPrivileged(Native Method) 

私が間違って何をすべきか?

答えて

1

問題はfork in run := false

build.sbt変更 fork in run := trueFutures timed out after [300000 milliseconds]

にありました

関連する問題