Hello,
I realize this is a shot in the dark, but it's possible that someone has run 
into similar issues or have some debugging tips.

On our production servers, we are getting exception from Tomcat 5.x

java.lang.IllegalStateException: Cannot create a session after the response has 
been committed at 
org.apache.catalina.connector.Request.doGetSession(Request.java:2214)

The exception happens in servlet filter; it happens very rarely - maybe 10 
times a day and we have relatively heavy traffic.

Before any of the actions are hit, request goes through StripesFilter and 
SecurityFilter.
In security filter, I am trying to access request's session to check for the 
presence of an attribute.

On rare occasion, we get this stack trace - it does not matter what the target 
action is.

I do set few attributes on the request and access request.servletPath before 
accessing a session.

If it might have anything to do with it, we are running on VMware, 64 bit java 
1.5, tomcat 5.5.20, stripes 1.4.3 - any debugging tips would be greatly 
appreciated.  I am hoping, there is no way Tomcat can recycle same request 
object while it's being used by another thread. We tried to run load tests 
against the app servers, but could not reproduce it consistently under heavy 
loads.

I can probably work around this exception, by explicitly checking 
response.isCommited(), but I want to understand what in the world does anything 
to it make it go in that state.


java.lang.IllegalStateException: Cannot create a session after the response has 
been committed  at 
org.apache.catalina.connector.Request.doGetSession(Request.java:2214)        at 
org.apache.catalina.connector.Request.getSession(Request.java:2024)  at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:831)  
     at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:842)  
     at 
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:223)
  at 
com.markettools.platform.webapp.view.admin.BaseSecurityFilter.getUserTokenId(BaseSecurityFilter.java:286)
    at 
com.markettools.platform.webapp.view.admin.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:99)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at 
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:180)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)   
     at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)   
     at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)  at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to