0

I'm receiving a,

java.lang.NullPointerException
    at play.core.server.netty.RequestBodyHandler$class.finish$1(RequestBodyHandler.scala:70)
    at play.core.server.netty.RequestBodyHandler$$anonfun$pushChunk$1$2$$anonfun$apply$2.apply(RequestBodyHandler.scala:53)
    at play.core.server.netty.RequestBodyHandler$$anonfun$pushChunk$1$2$$anonfun$apply$2.apply(RequestBodyHandler.scala:49)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

printed to the console when reloading a page in the Play framework. The cause is irrelevant for the purpose of this question. I've tried to suppress the message but can not seem to figure it out. Even with ALL logback logging turned OFF this is the only message that is still printed.

Where is it coming from and how do I stop it?

tysonjh
  • 1,329
  • 1
  • 12
  • 27
  • 1
    My guess is there is some code that is calling `Exception.printStackTrace()` rather that utilizing the logger. I did a quick google to figure out how to redirect standard error to a logger, but didn't immediately find the solution for ya. I know that log4j can do this. – joescii Sep 17 '13 at 20:09
  • 1
    You are correct. RequestBodyHandler.scala:99 `e.getCause().printStackTrace();` -- post an answer for points! – tysonjh Sep 17 '13 at 20:51
  • FYI: this is of use http://stackoverflow.com/a/1370033/1274818 – tysonjh Sep 17 '13 at 20:57

1 Answers1

1

My guess is there is some code that is calling Exception.printStackTrace() rather that utilizing the logger. I did a quick google to figure out how to redirect standard error to a logger, but didn't immediately find the solution for ya. I know that log4j can do this.

joescii
  • 6,495
  • 1
  • 27
  • 32