Announcement Announcement Module
Collapse
No announcement yet.
Refresh problem - Access to flow execution denied Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Refresh problem - Access to flow execution denied

    Hello,

    We are building new commercial application with Spring Web Flows/Struts/Hibernate. The web server is Tomcat 5.0.3.

    Upon "refreshing" the browser, the flowExecutor loses track and sends the PermissionDeniedFlowExecutionAccessException (See listing below). This only happens on the second view-state of a flow. The first view state can refresh without problems.

    The problem can be reproduced with the sample phonebook application. Click refresh on the search results screen.

    Is this specific to Tomcat 5.0 ? Later versions (5.5) appear to fix the problem, but I have my doubts. Is Spring Web Flows ready for production apps?

    Has anyone else seen this Refresh problem?

    Thanks & Cheers,

    Mike Pastor



    org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.springframework.webflow.execution.repository.P ermissionDeniedFlowExecutionAccessException: Unable to restore flow execution with key '_c7829BE43-F20B-7200-7FCD-CB9FC850976B_k5978D516-F25B-5BBA-BE78-820491654ACE' -- permission denied.; nested exception is org.springframework.webflow.execution.repository.s upport.InvalidContinuationIdException: The continuation id '5978D516-F25B-5BBA-BE78-820491654ACE' is invalid. Access to flow execution denied.
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:408)
    org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:360)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)


    root cause

    org.springframework.webflow.execution.repository.P ermissionDeniedFlowExecutionAccessException: Unable to restore flow execution with key '_c7829BE43-F20B-7200-7FCD-CB9FC850976B_k5978D516-F25B-5BBA-BE78-820491654ACE' -- permission denied.; nested exception is org.springframework.webflow.execution.repository.s upport.InvalidContinuationIdException: The continuation id '5978D516-F25B-5BBA-BE78-820491654ACE' is invalid. Access to flow execution denied.
    org.springframework.webflow.execution.repository.s upport.DefaultFlowExecutionRepository.accessFlowEx ecution(DefaultFlowExecutionRepository.java:132)
    org.springframework.webflow.execution.repository.s upport.DefaultFlowExecutionRepository.getFlowExecu tion(DefaultFlowExecutionRepository.java:98)
    org.springframework.webflow.execution.repository.s upport.RebindingFlowExecutionRepository.getFlowExe cution(RebindingFlowExecutionRepository.java:64)
    org.springframework.webflow.executor.FlowExecutorI mpl.signalEvent(FlowExecutorImpl.java:227)
    org.springframework.webflow.executor.support.FlowR equestHandler.handleFlowRequest(FlowRequestHandler .java:113)
    org.springframework.webflow.executor.mvc.FlowContr oller.handleRequestInternal(FlowController.java:19 9)
    org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:153)
    org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:45)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:797)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:727)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396)
    org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:360)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)


    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.

  • #2
    The behavior you are seeing is expected with your configuration. You are using a repository implementation that does not support browser refresh or back navigation and resubmit, one specifically designed for apps that strictly lock down the browser navigation buttons--so it is telling you you're not allowed to do that. See the Flow Execution Repository section of the reference manual for more information.

    To support browser refresh and back/forward buttons, you need to switch in a repository that supports such usage. The continuation-based flow execution repository factory is one option. The Phonebook sample "as-is" in the 1.0 RC3 release shows this option and thus supports browser refresh (as well as back with page caching).

    BTW it does not make sense for the same exception to occur with Phonebook, as Phonebook uses a different repository that doesn't throw that PermissionDenied exception.

    I'm not sure why the behavior would be different on tomcat 5.0 and 5.5--I would expect it to fail consistently on both with the configuration above.

    BTW -- The reason it "looks like" it "works" on the first view-state of the flow is when you press refresh you're likely resubmitting your GET request to launch the flow, launching an independent flow execution each time. You can solve this by setting "redirectOnPause" to true on the flow executor to always redirect to the flow execution after a view state is entered--sellitem shows this.

    A "RC" status indicates a Web Flow candidate for a general available production release. RCs are stable releases; 1.0 RC3 has proven very stable thus far.

    Keith
    Last edited by Keith Donald; Jul 4th, 2006, 05:01 PM.

    Comment

    Working...
    X