Results 1 to 7 of 7

Thread: Banging head against wall: NoMatchingTransitionException

  1. #1
    Join Date
    Aug 2004
    Posts
    1,905

    Default Banging head against wall: NoMatchingTransitionException

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

    My action-state looks like:

    Code:
      <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>
        <action bean="lockAction" name="lock">
          <property name="pagesAccessor" value="accessAllowedPagesAccessor"/>
          <property name="successfulAccessor" value="lockedPagesAccessor"/>
          <property name="unSuccessfulAccessor" value="failedToLockPagesAccessor"/>
        </action>
        <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"/>
        </action>
        <transition on="success" to="doneSinglePage.action"/>
        <transition on="error" to="rollBack.action"/>
      </action-state>
    And when I step through, everything works as expected, but at the end of the process I get the following stack trace:

    Code:
    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;ActionState.java&#58;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,

    Colin

  2. #2
    Join Date
    Aug 2004
    Posts
    1,905

    Default Ahhh :)

    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. #3

    Default

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

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    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...

    Keith
    Keith Donald
    Core Spring Development Team

  5. #5
    Join Date
    Aug 2004
    Posts
    1,905

    Default

    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. #6
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    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?

    Erwin

  7. #7
    Join Date
    Aug 2004
    Posts
    1,905

    Default

    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.

Similar Threads

  1. Starting head first
    By Martin Kersten in forum Swing
    Replies: 2
    Last Post: Feb 20th, 2005, 03:25 AM
  2. Replies: 10
    Last Post: Feb 16th, 2005, 11:34 AM
  3. trying to wrap my head around spring.
    By jpwillms in forum Container
    Replies: 3
    Last Post: Dec 18th, 2004, 12:40 PM
  4. Replies: 2
    Last Post: Oct 18th, 2004, 10:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •