Tomcat运行一段时间会出现Cannot create a session after the response has been committed

发布于 2021-11-24 22:43:22 字数 5176 浏览 1007 评论 1

框架是使用的是Struts2+Freemarker

2014-5-8 3:06:18 org.apache.jasper.runtime.JspFactoryImpl internalGetPageContext

严重: 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:2390)

at org.apache.catalina.connector.Request.getSession(Request.java:2110)

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:547)

at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:493)

at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:224)

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.notification.error_002dpage_jsp._jspService(error_002dpage_jsp.java:48)

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:386)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)

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:646)

at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)

at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)

at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:166)

at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)

at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)

at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)

at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563)

at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

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:298)

at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)

at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)

at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)

at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)

at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)

at java.lang.Thread.run(Thread.java:662)

2014-5-8 10:12:51 org.apache.jk.common.ChannelSocket processConnection

警告: processCallbacks status 2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

奢华的一滴泪 2021-11-25 01:06:34

应该跟内存有关吧,如果内存满的话,是不是就不能够再去创建新的session了++++++感觉是这样  我也不是很懂

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文