Announcement Announcement Module
No announcement yet.
problems with portlets and exception Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • problems with portlets and exception

    I had 2 portlets displayed on a page. On one portlet I caused an exception in the back end which was handled by the flow definition returning a pretty message to screen. Then on the second portlet I submited a form. The first portlet then received following exception. Any ideas why this is happening?

    X Nested Exception is org.springframework.webflow.execution.repository.P ermissio
    nDeniedFlowExecutionAccessException: Unable to restore flow execution with key '
    _cB5F465B4-AD3E-E731-A6BE-6642A43B50AE_kA26F958D-2E07-0A73-AE36-482A26A00D4D' --
    permission denied.; nested exception is org.springframework.webflow.execution.r The continuation id 'A26F958D-
    2E07-0A73-AE36-482A26A00D4D' is invalid. Access to flow execution denied.
    X Caused by: org.springframework.webflow.execution.repository.s upport.InvalidCon
    tinuationIdException: The continuation id 'A26F958D-2E07-0A73-AE36-482A26A00D4D'
    is invalid. Access to flow execution denied.

  • #2
    I take it back... It doesn't only happen with exceptions...

    I take it back... It doesn't only happen with exceptions... Even if I do the happy path and transition from one view state to another then if I refresh screen on second view state I get same error.


    • #3
      Stack trace... Using 0719 nightly build

      protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) throws Exception {

      if (log.isTraceEnabled()) {
      log.trace("Begin JsfPortletFlowController.handleRenderRequestIntern al()");

      FlowExecutionHolder holder = (FlowExecutionHolder) request.getPortletSession().getAttribute(FLOW_EXEC UTION_HOLDER);
      String viewName;
      Map model;
      if (holder == null || (holder.getFlowExecution() != null && holder.getFlowExecution().isActive())) {
      ModelAndView view = super.handleRenderRequestInternal(request, response);

      Last line above is line 182 in JsfPortletFlowController

      Stack Trace:
      X at org.springframework.webflow.execution.repository.s upport.DefaultFlowE
      X at org.springframework.webflow.execution.repository.s upport.DefaultFlowE
      X at org.springframework.webflow.execution.repository.s upport.DefaultFlowE
      X at org.springframework.webflow.execution.repository.s upport.RebindingFlo
      X at org.springframework.webflow.executor.FlowExecutorI mpl.refresh(FlowExe
      X at org.springframework.webflow.executor.mvc.PortletFl owController.handle
      RenderRequestInternal( 02)
      X at org.springframework.webflow.executor.mvc.JsfPortle tFlowController.han
      dleRenderRequestInternal(JsfPortletFlowController. java:182)


      • #4
        I know you are busy keith but can you help?

        I know you are busy keith but can you help?
        Once the second page is displayed

        logger.debug("Saving continuation to repository with key " + holder.getFlowExecutionKey());

        in flowPhaseListener is executed saving the continuation id

        On refresh

        org.springframework.webflow.execution.repository.s upport.DefaultFlowExecutionRepository$FlowExecutio [email protected]

        contains saved continuation id

        BUT in

        DefaultFlowExecutionRepository$FlowExecutionEntry. access(Serializable) line: 174

        containuation id is different so match fails.


        • #5
          Keith.. I need an overview of where the continuation_id gets assigned

          Keith.. I need an overview of where the continuation_id gets assigned.

          My code flow currently is:

          * JsfFlowController delegates to PortletFlowController with line.
          ModelAndView view = super.handleRenderRequestInternal(request, response);

          * FlowExecution Key is correctly extracted and responseInstruction is null

          Which according to comments says simply refresh

          * flowExecutor.refresh(flowExecutionKey, context) is called
          and the flow execution for that key is attempted to be retrieved with line
          FlowExecution flowExecution = repository.getFlowExecution(repositoryKey);

          * It appears RebindingFlowExecutionRepository.getFlowExecution( FlowExecutionKey) line: 64 is used as repository implementation

          * target on above line is
          org.springframework.webflow.execution.repository.s upport.DefaultFlowExecutionRepository

          * Then it does access check and fails..

          I guess I need help figuring out where I went wrong. So please assist if you will Keith. I've got a demo coming up on this stuff and i'd really hate to go to demo with bug like this in the code. After all I'm trying to sell webflow as the premier way to develop web apps for this company.


          • #6
            It may be faster for you to skype me about this. Do you have skype? My skypeid is kpdonald.



            • #7

              Just added you as a contact in skype. Mine is garpinc.


              • #8
                Current status

                I managed to start a flow in the jsfportletflowcontroller. Everything including refresh now works except the transition to the beginning of flow again.

                As I told you I just didn't send flowExecutionKey but now with refactoring that doesn't work. It says that flowScope was referred to and there was no flowExecution bound to thread.

                If I transition with the flowExecutionKey then the old data is there so that's no good either

                I want the flow to be destroyed so kind of what I think I need is an end state where on the next future transition irrespective of what it is the flow is ended and can be restarted.

                Is there anything like that now?


                • #9
                  Back button issues

                  If the back button is pressed with DefaultFlowExecutionRepositoryFactory, currently my JsfPortletFlowController implementation see's no restored flow execution and no flow execution holder. As a result JsfPortletFlowController starts the flow again. I think that mean that the old flow execution is hanging around so how do you propose I find it and get rid of it?