JSON api错误的堆栈跟踪不显示我的代码的行号。由于可能的原因,搜索我的所有文件都很费时间......
我也读过this - 这很有用,但这只是关于行号的线程。
堆栈跟踪看起来像:
play.api.Application$$anon$1: Execution exception[[JsResultException: JsResultException(errors:List((,List(ValidationError(validate.error.expected.jsarray,WrappedArray())))))]]
at play.api.Application$class.handleError(Application.scala:289) ~[play_2.10.jar:2.1.3]
at play.api.DefaultApplication.handleError(Application.scala:383) ~[play_2.10.jar:2.1.3]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$play$core$server$netty$PlayDefaultUpstreamHandler$$handle$1$1.apply(PlayDefaultUpstreamHandler.scala:143) ~[play_2.10.jar:2.1.3]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$play$core$server$netty$PlayDefaultUpstreamHandler$$handle$1$1.apply(PlayDefaultUpstreamHandler.scala:139) ~[play_2.10.jar:2.1.3]
at play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113) ~[play_2.10.jar:2.1.3]
at play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113) ~[play_2.10.jar:2.1.3]
play.api.libs.json.JsResultException: JsResultException(errors:List((,List(ValidationError(validate.error.expected.jsarray,WrappedArray())))))
at play.api.libs.json.JsValue$$anonfun$2.apply(JsValue.scala:67) ~[play_2.10.jar:2.1.3]
at play.api.libs.json.JsValue$$anonfun$2.apply(JsValue.scala:67) ~[play_2.10.jar:2.1.3]
at play.api.libs.json.JsResult$class.fold(JsResult.scala:69) ~[play_2.10.jar:2.1.3]
at play.api.libs.json.JsError.fold(JsResult.scala:10) ~[play_2.10.jar:2.1.3]
at play.api.libs.json.JsValue$class.as(JsValue.scala:65) ~[play_2.10.jar:2.1.3]
at play.api.libs.json.JsNumber.as(JsValue.scala:108) ~[play_2.10.jar:2.1.3]
答案 0 :(得分:2)
我没有一个优雅的解决方案,但详细的堆栈跟踪可以在logs\application.log
中找到 - 它在这种情况下帮助我