java.lang.IllegalStateException:removeAttribute:会话已经失效

时间:2015-03-03 21:42:51

标签: java session tomcat

我有一个在tomcat服务器上运行的Web应用程序。我的应用程序是从数据库中获取数据。还有许多额外的计算,因此这可能持续约一个小时或更长时间。在此之后,当所有操作完成后,我得到了这个例外:

  

java.lang.IllegalStateException:removeAttribute:会话已经失效       at org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1262)       在org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1237)       在org.apache.catalina.session.StandardSessionFacade.removeAttribute(StandardSessionFacade.java:140)       at com.system.PageServlet.handleJsp(PageServlet.java:670)       在com.system.PageServlet.doRun(PageServlet.java:384)       at com.system.PageServlet.doGet(PageServlet.java:172)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:617)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:717)       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)       在filters.ObjectsCacheFilter.doFilter(ObjectsCacheFilter.java:43)       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)       在filters.FilterCach.doFilter(FilterCach.java:80)       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)       at filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:123)       在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)       在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)       在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)       在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)       在com.googlecode.psiprobe.Tomcat60AgentValve.invoke(Tomcat60AgentValve.java:30)       在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)       在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)       在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)       在org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)       在org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:606)       在org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:489)       在java.lang.Thread.run(未知来源)

修改 这是我得到例外的代码:

  

session.removeAttribute(" TEST1&#34);   session.removeAttribute(" TEST2&#34);

有人可以帮助我吗?

0 个答案:

没有答案