Announcement Announcement Module
No announcement yet.
Banging head against wall: NoMatchingTransitionException Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Banging head against wall: NoMatchingTransitionException

    I keep getting the following error (NoMatchingTransitionException), and cannot figure out why.

    My action-state looks like:

      <action-state id="addToPage.action">
        <action bean="loadPageAction" name="load"/>
        <action bean="checkAdminPagesAction" name="permissions">
          <property name="pagesAccessor" value="currentPageAccessor"/>
          <property name="successfulAccessor" value="accessAllowedPagesAccessor"/>
          <property name="unSuccessfulAccessor" value="accessDeniedPagesAccessor"/>
        <action bean="lockAction" name="lock">
          <property name="pagesAccessor" value="accessAllowedPagesAccessor"/>
          <property name="successfulAccessor" value="lockedPagesAccessor"/>
          <property name="unSuccessfulAccessor" value="failedToLockPagesAccessor"/>
        <action bean="createPagePermissionFormAction" name="create"/>
        <action bean="bindPagePermissionAction" name="bind" method="bindAndValidate"/>
        <action bean="assignPagePermissionAction">
          <property name="pagesAccessor" value="lockedPagesAccessor"/>
          <property name="successfulAccessor" value="nullAccessor"/>
          <property name="unSuccessfulAccessor" value="nullAccessor"/>
        <transition on="success" to="doneSinglePage.action"/>
        <transition on="error" to="rollBack.action"/>
    And when I step through, everything works as expected, but at the end of the process I get the following stack trace:

    13&#58;21&#58;33,984 ERROR &#91;DispatcherServlet&#93; Could not complete request org.springframework.web.flow.NoMatchingTransitionException&#58; No transition was matched to the event&#40;s&#41; signaled by the 6 action&#40;s&#41; that executed in this action state 'addToPage.action' of flow  editPermissionsFlow'; transitions must be defined to handle action result  utcomes -- possible flow configuration error? Note&#58; the eventIds signaled  ere&#58; 'array<String>&#91;'load.success', 'permissions.success', 'lock.success', create.success', 'bind.success', 'success'&#93;', while the supported set of ransitional criteria for this action state is array<TransitionCriteria>&#91;'success', 'error'&#93;' at org.springframework.web.flow.ActionState.doEnter&#40;;382&#41;
    What am I missing?

    I though webflow would ignore any events that don't have a transition mapped and go with the first one that is mapped.

    Many thanks,


  • #2

    So the problem wasn't in that action-state it was actually in one further down the flow. And indeed the offending action-state didn't have the appropriate transitions.

    It would have been much more helpful if the error message indicated the correct action-state though


    • #3
      If you set your log level to DEBUG you'll be notified in your logs what action you're executing.


      • #4
        Hmmm this message looks correct to me, and to me it does look like the action state above was the problem -- your transition criteria "success" or "error" didn't match one of the results of your actions... you used named actions so remember the results are QUALIFIED in that case...



        • #5
          The very last action is non-named, so it should work.

          The giveaway was that I could step through the entire process, i.e. through that action-state and into others.

          But, yes, a later action state (which I didn't post) did have a mismatch. Still the error *wasn't* in the posted action-state.


          • #6
            That's bizar. Looking at the code in the ActionState class I don't see how this exception could be generated for the wrong state. Could you post the complete stack trace of the exception you got?



            • #7
              Can't because I fixed it

              The problem was actually in the next action, the "doneSinglePage.action". That action did have a mismatch between transitions and actions.

              Basically, don't believe the action state that the error message gives. Check *all* action states that can be called.