-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSF2.2--com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError #45
Comments
Hi @genlly, Which version of the session manager are you using? |
Hi @genlly, I tried reproducing the issue in my local. The session manager is working fine as expected. PS - test project for your reference. Please let me know your thoughts on this. Thanks! |
Thanks ran-jit, I use ran-jit/tomcat-cluster-redis-session-manager3.0.3, and I use viewScoped managed bean, in the request method, as visit from the browser, it's normal, but when you click a <h:commandButton> or a <h:commandlink> in a <h:form>, that's the POST method, it fails and throw out this exception. |
Something more: it works fine in tomcat7, and leaks in tomcat8:( |
Hi @genlly, By default, HTTP stores the status of the JSF view in the request session. When the JSF view page is inactive for a long time, Tomcat removes/expires the session values when the session timeout is reached. Now when we try to access the view page, the exception below is thrown, since the view state is removed in session. Fix: 1 Configuration (tomcat/conf/web.xml)
Fix: 2 Configuration (tomcat/conf/web.xml)
Fix: 3 (Recommended) Configuration (project-resources/webapp/WEB-INF/web.xml)
FYI - I reproduced the issue and tested with the recommended 3rd fix. Working fine. I hope this helps! Thanks! |
Hi @ran-jit , |
Hi @genlly, Have you resolved this issue? Are any changes required in this session manager? |
Hi, @ran-jit , |
Thanks for the update @genlly. I am currently on vacation with my family. Will update you as soon as I identify and fix this. |
Dear ran-jit:
Thanks a lot for your contribution! Your tomcat 8 session manager reallys helps me! But it does not work fine in JSF2.2 enviroment, when I use dopost method through the components in the <h:form> , like click a <p:commandlink> or a <p:commandbutton>, when it trigger the request, it throws out an exception in the 29th row of "tomcat.request.session.redis.SessionHandlerValve.invoke", and all the ajax functionalities fails.
The full exception is like this:
31-Aug-2019 00:36:35.144 SEVERE [http-nio-8080-exec-7] com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError javax.faces.application.ViewExpiredException: viewId:/createorder.jsf - can not restore view /createorder.jsf
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:212)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at tomcat.request.session.redis.SessionHandlerValve.invoke(SessionHandlerValve.java:29)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
I really like your work, and I deelpy hope that is works in a JSF circumstance, thanks again and waiting for your reply!
The text was updated successfully, but these errors were encountered: