https://issues.apache.org/bugzilla/show_bug.cgi?id=44646
Summary: IllegalStateException when using
CometConnectionManagerValve
Product: Tomcat 6
Version: 6.0.16
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Connectors
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
We're writing an application that processes requests using both a normal
servlet and a CometProcessor. The normal servlet handles user authentication
and logout (among other things). Once the user has been authenticated, the
client makes a Comet request, which is open until the server has something to
push to the client. When the user decides to log out, we need to stop
processing Comet events for that client. I enabled the
CometConnectionManagerValve in context.xml, hoping I would get an END event
when the session goes away. Instead, I get an IllegalStateException:
Mar 10, 2008 2:05:41 PM org.apache.catalina.connector.CoyoteAdapter event
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.IllegalStateException: Cannot create a session after the response has
been committed
at org.apache.catalina.connector.Request.doGetSession(Request.java:2301)
at org.apache.catalina.connector.Request.getSession(Request.java:2075)
at
org.apache.catalina.valves.CometConnectionManagerValve.event(CometConnectionManagerValve.java:311)
at
org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:179)
at org.apache.catalina.valves.ValveBase.event(ValveBase.java:200)
at
org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:128)
at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:198)
at
org.apache.coyote.http11.Http11NioProcessor.event(Http11NioProcessor.java:749)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.event(Http11NioProtocol.java:653)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Presumably my servlet handles the "logout" request, and after sending a
response to the client, calls invalidate() on the HttpSession. Subsequently,
CometConnectionManagerValue.event() calls request.getSession(true), resulting
in the IllegalStateException.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]