I am facing a simple but serious issue, need your help in resolving it.
When i issue an AJAX post request from client side to play framework, i get a play - java.nio.channels.ClosedChannelException in the logs.
Inside the controller, all logs are printed but after the ok(...) is returned, the logs has the following stack trace -
[trace] play - Invoking action with request: POST /addinterest
[info] application - wonder
[info] application - Returning {"status":"ok"}
[trace] play - Sending simple result: SimpleResult(200, Map(Content-Type -> application/json; charset=utf-8, Set-Cookie -> ))
[debug] play - java.nio.channels.ClosedChannelException
[trace] application - Exception caught in Netty
java.nio.channels.ClosedChannelException: null
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:409) ~[netty.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromUserCode(AbstractNioWorker.java:127) ~[netty.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:99) ~[netty.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:36) ~[netty.jar:na]
at org.jboss.netty.channel.Channels.write(Channels.java:725) ~[netty.jar:na]
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:71) ~[netty.jar:na]
[trace] play - Http request received by netty: DefaultHttpRequest(chunked: false)
I had posted yesterday on an older thread, my apologies for multiple posting. But this time, i have reduced the clutter and reduced the problem scope to what it is. (Earlier in my actual app i was calling a webservice from the controller and i thought that the issue may be because of this webservice, but as the above example highlights, it is not the case).
Please let me know if i am doing something wrong? Any workaround would also be highly appreciated.
Thank you!
arvind