play.api.UnexpectedException:对端点

时间:2017-01-09 19:26:36

标签: scala playframework

我有一个Play 2.4.2 REST应用程序,它公开/ api / availability-stream-metrics端点。

路线文件如下:

GET / api / availability-stream-metrics @ controllers.MetricsController.availabilityStreamMetrics()

有时,/ api / availability-stream-metrics上的HTTP GET会导致下面给出的play.api.UnexpectedException。对/ api / availability-stream-metrics的后续请求不会得到任何响应。

MetricsController.availabilityStreamMetrics()返回JSON响应。

每隔60秒查询一次端点,但即使如此,这个错误很少发生,每月发生几次。它的出现没有明显的模式。

Scala版本:2.11.8

这是play / akka的已知问题吗?

! @7267i94mm - Internal server error, for (GET) [/api/availability-stream-metrics] ->

play.api.UnexpectedException: Unexpected exception[NumberFormatException: null]
play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:261) ~[com.typesafe.play.play_2.11-2.4.2.jar:2.4.2]
play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:191) ~[com.typesafe.play.play_2.11-2.4.2.jar:2.4.2]
play.api.GlobalSettings$class.onError(GlobalSettings.scala:179) [com.typesafe.play.play_2.11-2.4.2.jar:2.4.2]
play.api.DefaultGlobal$.onError(GlobalSettings.scala:212) [com.typesafe.play.play_2.11-2.4.2.jar:2.4.2]
play.api.http.GlobalSettingsHttpErrorHandler.onServerError(HttpErrorHandler.scala:94) [com.typesafe.play.play_2.11-2.4.2.jar:2.4.2]
play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$9$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:158) [com.typesafe.play.play-netty-server_2.11-2.4.2.jar:2.4.2]
play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$9$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:155) [com.typesafe.play.play-netty-server_2.11-2.4.2.jar:2.4.2]
scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.util.Failure$$anonfun$recover$1.apply(Try.scala:216) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.util.Try$.apply(Try.scala:192) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.util.Failure.recover(Try.scala:216) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:326) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:326) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [org.scala-lang.scala-library-2.11.8.jar:na]
play.api.libs.iteratee.Execution$trampoline$.executeScheduled(Execution.scala:109) [com.typesafe.play.play-iteratees_2.11-2.4.2.jar:2.4.2]
play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:71) [com.typesafe.play.play-iteratees_2.11-2.4.2.jar:2.4.2]
scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.Promise$class.complete(Promise.scala:55) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237) [org.scala-lang.scala-library-2.11.8.jar:na]
scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [org.scala-lang.scala-library-2.11.8.jar:na]
akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) [com.typesafe.akka.akka-actor_2.11-2.3.15.jar:na]
akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91) [com.typesafe.akka.akka-actor_2.11-2.3.15.jar:na]
akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) [com.typesafe.akka.akka-actor_2.11-2.3.15.jar:na]
akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) [com.typesafe.akka.akka-actor_2.11-2.3.15.jar:na]
scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) [org.scala-lang.scala-library-2.11.8.jar:na]

0 个答案:

没有答案