tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wall <d.w...@computer.org>
Subject Tomcat 7 - .ApplicationDispatcher invoke - Cannot create a session after the response has been committed
Date Wed, 02 May 2012 21:27:22 GMT
Here's another odd exception we are receiving on Tomcat 7.0.26 when 
doing load testing.

When this exception occurs, our code is basically calling: 
response.encodeURL(url);

It's in a FORM tag we created that is defined on a JSP page that should 
already have a session object created by:

<%@page contentType="text/html; charset=ISO-8859-1" 
import="org.example.PlayerRegistration2Page"%>

or more likely by our Launch servlet that is called before forwarding to 
the JSP with code like:

HttpSession session = request.getSession();
if ( session == null )
   return;

So we should already have a session created, and our FORM tag is in the 
middle of the JSP page where there is no code to invalidate the 
session.  It really seems like Tomcat is confusing sessions or the like 
when the load gets high, but not sure how to show/prove that.

May 2, 2012 1:55:48 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: Cannot create a session after the 
response has been committed
         at 
org.apache.catalina.connector.Request.doGetSession(Request.java:2855)
         at 
org.apache.catalina.connector.Request.getSessionInternal(Request.java:2465)
         at 
org.apache.catalina.connector.Response.encodeURL(Response.java:1236)
         at 
org.apache.catalina.connector.ResponseFacade.encodeURL(ResponseFacade.java:406)
         at com.esignforms.jsp.PageBean.encodeSession(PageBean.java:3321)
         at com.esignforms.jsp.PageBean.getMySessionUrl(PageBean.java:3276)
         at com.esignforms.html.taglibs2.Form.doStartTag(Form.java:95)
         at 
org.apache.jsp.playerRegistration2_jsp._jspService(playerRegistration2_jsp.java:230)
         at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
         at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
         at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
         at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
         at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
         at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
         at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
         at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
         at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
         at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
         at com.esignforms.servlet.Launch.doGet(Launch.java:100)
         at com.esignforms.servlet.Launch.doPost(Launch.java:116)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
         at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
         at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
         at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
         at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
         at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
         at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
         at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
         at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
         at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
         at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
         at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
         at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
         at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1600)
         at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:662)

Has anybody seen this?  We never saw it under Tomcat 5.5, but then we're 
not sure it was ever under the same load we are now throwing at Tomcat 7.

Thanks,
David


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message