tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Tomcat 7 Exception initializing page context; Cannot create a session after the response has been committed
Date Fri, 04 May 2012 12:21:25 GMT
On 04/05/2012 11:30, hunters1094 wrote:
> Hi
> 
> This is my stack trace
> 
> May 3, 2012 10:35:43 AM org.apache.jasper.runtime.JspFactoryImpl
> internalGetPageContext
> SEVERE: Exception initializing page context
> 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.connector.RequestFacade.getSession(RequestFacade.java:833)
> 	at
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
> 	at
> org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:545)
> 	at
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
> 	at
> org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:545)
> 	at
> org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:494)
> 	at
> org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:146)
> 	at
> org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:124)
> 	at
> org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:107)
> 	at
> org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:63)
> 	at
> org.apache.jsp.WEB_002dINF.jsp.pages.AssetReport.alertProcess.listAlertProcess_jsp._jspService(listAlertProcess_jsp.java:70)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
> 	at
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
> 	at
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:611)
> 	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
> 	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
> 	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
> 	at
> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
> 	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
> 	at
> org.apache.jsp.WEB_002dINF.jsp.pages.layout.layout_jsp._jspx_meth_tiles_005finsert_005f4(layout_jsp.java:1154)
> 	at
> org.apache.jsp.WEB_002dINF.jsp.pages.layout.layout_jsp._jspService(layout_jsp.java:604)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
> 	at
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
> 	at
> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
> 	at
> org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
> 	at
> org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302)
> 	at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
> 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> 	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.moza.qldtktts.util.CharsetFilter.doFilter(CharsetFilter.java:49)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> com.moza.qldtktts.filter.TimeRequestFilter.doFilter(TimeRequestFilter.java:64)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at moza.passport.util.VsaFilter.doFilter(VsaFilter.java:109)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:619)
> May 3, 2012 10:35:43 AM org.apache.jasper.runtime.JspFactoryImpl
> internalGetPageContext
> SEVERE: Exception initializing page context
> 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.connector.RequestFacade.getSession(RequestFacade.java:833)
> 	at
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
> 	at
> org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:545)
> 	at
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
> 	at
> org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:545)
> 	at
> org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:494)
> 	at
> org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:146)
> 	at
> org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:124)
> 	at
> org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:107)
> 	at
> org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:63)
> 	at
> org.apache.jsp.WEB_002dINF.jsp.pages.layout.copyright_jsp._jspService(copyright_jsp.java:44)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
> 	at
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
> 	at
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:611)
> 	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
> 	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
> 	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
> 	at
> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
> 	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
> 	at
> org.apache.jsp.WEB_002dINF.jsp.pages.layout.layout_jsp._jspx_meth_tiles_005finsert_005f5(layout_jsp.java:1173)
> 	at
> org.apache.jsp.WEB_002dINF.jsp.pages.layout.layout_jsp._jspService(layout_jsp.java:634)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
> 	at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
> 	at
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
> 	at
> org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
> 	at
> org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
> 	at
> org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302)
> 	at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
> 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> 	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.moza.qldtktts.util.CharsetFilter.doFilter(CharsetFilter.java:49)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> com.moza.qldtktts.filter.TimeRequestFilter.doFilter(TimeRequestFilter.java:64)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at moza.passport.util.VsaFilter.doFilter(VsaFilter.java:109)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:619)
> 
> There are 2 exceptions at the same time. Why?
> 
> The exception is thrown out at
> com.moza.qldtktts.util.CharsetFilter.doFilter(CharsetFilter.java:49). I
> think about when CharsetFilter.doFilter get exception, i catch and check the
> content of http request and response.  What do you think about it?

As explained to the OP of this thread, in 99.9% of cases this is because
the application is improperly retaining a reference to a request or
session object.

Check your code for a Servlet or something that sets one of those two
objects to an instance field, or retains it in some other way that is
not thread-safe.


p



-- 

[key:62590808]


Mime
View raw message