[2.2.1-java] - play-internal-execution-context - NullPointerException

121 views
Skip to first unread message

eduard...@usmediaconsulting.com

unread,
Mar 6, 2015, 12:53:59 PM3/6/15
to play-fr...@googlegroups.com
Hi guys,  since the last week we are reciving the folowing exception, 

the only difference is that we begin to have more demands on our service. Never had problems before.

I was thinking to upgrade the version of play.

Any ideas to debug?

Regards
Eduardo



2015-03-06 13:46:02,704 - [ERROR] - from application in play-internal-execution-context-3


! @6ld07376h - Internal server error, for (GET) [/match/add?gid=CAESEJEte6dMvPPIgZhP9MuJ_7U&google_cver=1] ->

play.api.Application$$anon$1: Execution exception[[NullPointerException: null]]
        at play.api.Application$class.handleError(Application.scala:289) ~[play_2.10-2.1.1.jar:2.1.1]
        at play.api.DefaultApplication.handleError(Application.scala:383) [play_2.10-2.1.1.jar:2.1.1]
        at play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1.apply(PlayDefaultUpstreamHandler.scala:144) [play_2.10-2.1.1.jar:2.1.1]
        at play.core.server.netty.PlayDefaultUpstreamHandler$$anon$2$$anonfun$handle$1.apply(PlayDefaultUpstreamHandler.scala:140) [play_2.10-2.1.1.jar:2.1.1]
        at play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113) [play_2.10-2.1.1.jar:2.1.1]
        at play.api.libs.concurrent.PlayPromise$$anonfun$extend1$1.apply(Promise.scala:113) [play_2.10-2.1.1.jar:2.1.1]
        at play.api.libs.concurrent.PlayPromise$$anonfun$extend$1$$anonfun$apply$1.apply(Promise.scala:104) [play_2.10-2.1.1.jar:2.1.1]
        at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) [scala-library.jar:na]
        at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) [scala-library.jar:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_55]
        at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
java.lang.NullPointerException: null

Mariot Chauvin

unread,
Mar 6, 2015, 1:49:04 PM3/6/15
to play-fr...@googlegroups.com
Hi Eduardo,

I think you get an NPE somewhere in your code but that unfortunately, if you don't see any other stacktrace in your log for the NPE, in this version of play (2.1.1) the initial stacktrace is not logged.

Cheers,

Mariot


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Visit theguardian.com. On your mobile and tablet, download the Guardian iPhone and Android apps theguardian.com/guardianapp and our tablet editions theguardian.com/editions.  Save up to 57% by subscribing to the Guardian and Observer - choose the papers you want and get full digital access.  Visit subscribe.theguardian.com

This e-mail and all attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender and delete the e-mail and all attachments immediately. Do not disclose the contents to another person. You may not use the information for any purpose, or store, or copy, it in any way.  Guardian News & Media Limited is not liable for any computer viruses or other material transmitted with or as part of this e-mail. You should employ virus checking software.
 
Guardian News & Media Limited is a member of Guardian Media Group plc. Registered Office: PO Box 68164, Kings Place, 90 York Way, London, N1P 2AP.  Registered in England Number 908396


Eduardo Cusa

unread,
Mar 8, 2015, 10:05:09 PM3/8/15
to play-fr...@googlegroups.com

Hi Mariot , yes you are right, there is an NPE in my code.
Finally i have found the problem and could fixed it.
Regards
Eduardo



--
You received this message because you are subscribed to a topic in the Google Groups "play-framework" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/play-framework/_XFuxycw4WA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to play-framewor...@googlegroups.com.

Sandeep Desam

unread,
Jan 16, 2017, 1:35:48 AM1/16/17
to Play Framework
Hi Mariot,

I am getting same issue .But I dont know where exactly I am getting NPE.Below is my error stack
play.api.Application$$anon$1: Execution exception[[NullPointerException: null content]]
at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10.jar:2.2.6]
at play.api.DefaultApplication.handleError(Application.scala:399) [play_2.10.jar:2.2.6]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:268) [play_2.10.jar:2.2.6]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:268) [play_2.10.jar:2.2.6]
at scala.Option.map(Option.scala:145) [scala-library.jar:na]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:268) [play_2.10.jar:2.2.6]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:264) [play_2.10.jar:2.2.6]
at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:344) [scala-library.jar:na]
at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:343) [scala-library.jar:na]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [scala-library.jar:na]
at play.api.libs.iteratee.Execution$$anon$1.execute(Execution.scala:43) [play-iteratees_2.10.jar:2.2.6]
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40) [scala-library.jar:na]
at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248) [scala-library.jar:na]
at scala.concurrent.Promise$class.complete(Promise.scala:55) [scala-library.jar:na]
at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153) [scala-library.jar:na]
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) [scala-library.jar:na]
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) [scala-library.jar:na]
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) [scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1361) [scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [scala-library.jar:na]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [scala-library.jar:na]
Caused by: java.lang.NullPointerException: null content
at play.mvc.Results$Status.<init>(Results.java:1274) ~[play_2.10.jar:2.2.6]
at play.mvc.Results.ok(Results.java:186) ~[play_2.10.jar:2.2.6]
at controllers.Application.getDMIFamilySelectionInfo(Application.java:302) ~[classes/:na]



Please help me with this,

Greg Methvin

unread,
Jan 16, 2017, 7:08:29 PM1/16/17
to play-framework
Hi Sandeep,

You can figure out where the exception is coming from in your app by looking at the stack trace. At the bottom, you see "Caused by: java.lang.NullPointerException: null content". The stack trace given is:
at play.mvc.Results$Status.<init>(Results.java:1274) ~[play_2.10.jar:2.2.6]
at play.mvc.Results.ok(Results.java:186) ~[play_2.10.jar:2.2.6]
at controllers.Application.getDMIFamilySelectionInfo(Application.java:302) ~[classes/:na]

So if you look at the relevant lines of code, it seems like the JsonNode is null, and this happens because you're passing a null JsonNode to Results.ok on line 302 of your Application.java file

In general, if you look at the last "cause" exception in the stack trace and find the first line of code there coming from your application, it should be pretty straightforward to figure out what is causing the exception.

Greg


--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/cfc17d4f-1349-4528-8822-a87dd04ba394%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Greg Methvin
Tech Lead - Play Framework

Reply all
Reply to author
Forward
0 new messages