Atmosphere/atmosphere — Issue #144: java.lang.IllegalStateException: Request object no longer valid
Author: survivant
Created: 2012-01-12 15:38:08+00:00
State: open

in AsyncronousProcessor

public Action timedout(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {

I found that on Jetty 8.1RC2 : throws a exception sometime, so the listener are not notify

this code :

try {
if (r != null) {
r.cancel(); // THROWS : java.lang.IllegalStateException: Request object no longer valid. This object has been cancelled
r.notifyListeners();
}
} catch (Throwable t) {
logger.trace("timedout", t);
} finally {

Thread qtp11845181-20)

JettyCometSupportWithWebSocket(AsynchronousProcessor).timedout(HttpServletRequest, HttpServletResponse) line: 398

Jetty7CometSupport$1.onTimeout(Continuation) line: 117

AsyncContinuation.expired() line: 518

AsyncContinuation$AsyncTimeout.run() line: 1032
QueuedThreadPool.runJob(Runnable) line: 598
QueuedThreadPool$3.run() line: 533

Thread.run() line: not available

java.lang.IllegalStateException: Request object no longer valid. This object has been cancelled
at org.atmosphere.cpr.AtmosphereResourceImpl.getRequest(AtmosphereResourceImpl.java:384)
at org.atmosphere.cpr.AtmosphereResourceImpl.getRequest(AtmosphereResourceImpl.java:403)
at org.atmosphere.container.Jetty7CometSupport.action(Jetty7CometSupport.java:182)
at org.atmosphere.protocol.socketio.SocketIOCometSupport.action(SocketIOCometSupport.java:283)
at org.atmosphere.protocol.socketio.SocketIOCometSupport.action(SocketIOCometSupport.java:28)
at org.atmosphere.cpr.AtmosphereResourceImpl.cancel(AtmosphereResourceImpl.java:673)
at org.atmosphere.cpr.AsynchronousProcessor.timedout(AsynchronousProcessor.java:394)
at org.atmosphere.container.Jetty7CometSupport$1.onTimeout(Jetty7CometSupport.java:117)
at org.eclipse.jetty.server.AsyncContinuation.expired(AsyncContinuation.java:518)
at org.eclipse.jetty.server.AsyncContinuation$AsyncTimeout.run(AsyncContinuation.java:1032)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Unknown Source)