Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Error submitting form: multiple _flowExecutionId error

  1. #1
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default Error submitting form: multiple _flowExecutionId error

    All,

    I am getting the following error when submitting a form:

    java.lang.IllegalArgumentException: The '_flowExecutionId' parameter was unexpectedly set to an array with values: array<String>['B08E8418-491A-2636-BF05-03FDD9567586', '87B3F5AA-4C78-9907-D260-EECD2B396899']; this is likely a view configuration error: make sure you submit a single string value for the '_flowExecutionId' parameter!
    org.springframework.webflow.execution.ExternalEven t.verifySingleStringInputParameter(ExternalEvent.j ava:128)
    org.springframework.webflow.execution.FlowExecutio nManager.getFlowExecutionId(FlowExecutionManager.j ava:502)
    org.springframework.webflow.execution.FlowExecutio nManager.onEvent(FlowExecutionManager.java:399)
    org.springframework.webflow.execution.FlowExecutio nManager.onEvent(FlowExecutionManager.java:384)
    org.springframework.webflow.execution.servlet.Serv letFlowExecutionManager.handle(ServletFlowExecutio nManager.java:77)
    org.springframework.webflow.mvc.FlowController.han dleRequestInternal(FlowController.java:137)
    org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:128)
    org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:44)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:684)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:625)
    org.springframework.web.servlet.FrameworkServlet.s erviceWrapper(FrameworkServlet.java:386)
    org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:355)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    com.opensymphony.module.sitemesh.filter.PageFilter .parsePage(PageFilter.java:118)
    com.opensymphony.module.sitemesh.filter.PageFilter .doFilter(PageFilter.java:52)

    No other forms in my application produce this error. The form setup is pretty straight forward. The one difference is in my FormAction, I am overriding setupForm to supply some referenceData to the form. Other than that, nothing special.

    Some info about the app. At this point there isn't a whole lot to it. A couple of web flows that comprise a master-detail list, a cart and check out pages (this is where the error occurs).

    The app is configured to use HttpSessionContinuations. That is all the really noteworthy stuff. BTW, I am using Spring WebFlows PR4.

    Anyone run into this?

    Thanks,
    Dan

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

    Default

    That exception is thrown when its detected that you're accidently submitting the _flowExecutionId parameter TWICE (or more accurately, more than once). Check your view code.

    Keith
    Keith Donald
    Core Spring Development Team

  3. #3
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Could this be the result of 2 submit buttons?

    I am submitting the form 1 of 2 ways: submit to continue to next page in flow and submit to go back one page in the flow.

    Should the back button be something other than an input type=submit?

    Dan

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

    Default

    Pasting in your view code would help.

    No, two submit buttons isn't the probem! It's that you're submitting the _flowExecutionId property twice on the same form!

    Keith
    Keith Donald
    Core Spring Development Team

  5. #5
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    I will post it when I can. I am not infront of that code right now. What would you like to see? the flow xml, the jsp?

    flowExecutionId is only declared once on the page as a hidden input field.

    Thanks for your help.

    Dan

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

    Default

    jsp -- somethings submitting that _flowExecutionId twice -- it's coming in as a String array instead of a String.

    Keith
    Keith Donald
    Core Spring Development Team

  7. #7
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Thanks Kieth, I will upload it when I get home tonight.

    Dan

  8. #8
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Keith,
    Here is the jsp. It is just a simple form.

    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

    <html>
    <head>
    <title>customer</title>
    </head>

    <body>
    <form name="customerForm" method="post">
    <input type="hidden" name="_flowExecutionId" value="<c:out value="${flowExecutionId}" />" />
    <input type="hidden" name="_flowId" value="cart" />
    <table width="90%" border="0" cellpadding="2" cellspacing="0" align="center">
    <tr>
    <td colspan="3">Please fill out your Shipping Information.</td>
    </tr>
    <tr>
    <td colspan="3"></td>
    </tr>
    <spring:bind path="customer.name">
    <tr>
    <td width="15%" class="label" nowrap>Name:</td>
    <td width="50%" nowrap>
    <input type="text" maxlength="50" name="<c:out value="${status.expression}" />" value="<c:out value="${status.value}"/>" />
    </td>
    <td class="error" nowrap><c:out value="${status.errorMessage}" /></td>
    </tr>
    </spring:bind>
    <spring:bind path="customer.address">
    <tr>
    <td class="label" nowrap>Address:</td>
    <td nowrap>
    <input type="text" maxlength="50" name="<c:out value="${status.expression}" />" value="<c:out value="${status.value}"/>" />
    </td>
    <td class="error" nowrap><c:out value="${status.errorMessage}" /></td>
    </tr>
    </spring:bind>
    <spring:bind path="customer.city">
    <tr>
    <td class="label" nowrap>City</td>
    <td nowrap>
    <input type="text" maxlength="20" name="<c:out value="${status.expression}" />" value="<c:out value="${status.value}"/>" />
    </td>
    <td class="error" nowrap><c:out value="${status.errorMessage}" /></td>
    </tr>
    </spring:bind>
    <spring:bind path="customer.state">
    <tr>
    <td class="label" nowrap>State:</td>
    <td nowrap>
    <input type="text" size="2" maxlength="2" name="<c:out value="${status.expression}" />" value="<c:out value="${status.value}"/>" />
    </td>
    <td class="error" nowrap><c:out value="${status.errorMessage}" /></td>
    </tr>
    </spring:bind>
    <spring:bind path="customer.zip">
    <tr>
    <td class="label" nowrap>Zip Code (5 or 9 digits):</td>
    <td nowrap>
    <input type="text" maxlength="9" name="<c:out value="${status.expression}" />" value="<c:out value="${status.value}"/>" />
    </td>
    <td class="error" nowrap><c:out value="${status.errorMessage}" /></td>
    </tr>
    </spring:bind>
    <spring:bind path="customer.phone">
    <tr>
    <td class="label" nowrap>Phone Number:</td>
    <td nowrap>
    <input type="text" name="<c:out value="${status.expression}" />" value="<c:out value="${status.value}"/>" />
    </td>
    <td class="error" nowrap><c:out value="${status.errorMessage}" /></td>
    </tr>
    </spring:bind>
    <tr>
    <td colspan="3"></td>
    </tr>
    <spring:bind path="customer.shipping">
    <tr>
    <td class="label" nowrap>Shipping Information:</td>
    <td nowrap>
    <select name="<c:out value="${status.expression}" />" >
    <option></option>
    <c:forEach var="element" items="${model.shipping}">
    <option <c:if test="${status.value == element}">selected</c:if>><c:out value="${element}" /></option>
    </c:forEach>
    </select>
    </td>
    <td class="error" nowrap><c:out value="${status.errorMessage}" /></td>
    </tr>
    </spring:bind>
    <tr>
    <td colspan="3"></td>
    </tr>
    <spring:bind path="customer.survey">
    <tr>
    <td valign="top" class="label" nowrap>Survey:</td>
    <td nowrap>
    What do you think of this application?<br /><br />
    <c:forEach var="element" items="${model.survey}">
    <input type="checkbox"
    name="<c:out value="${status.expression}" />"
    value="<c:out value="${element}" />"
    <c:if test="${status.value == element}">checked</c:if>
    >
    <c:out value="${element}" />
    </input>
    <br />
    </c:forEach>
    </td>
    <td class="error" nowrap><c:out value="${status.errorMessage}" /></td>
    </tr>
    <tr>
    <td colspan="3"></td>
    </tr>
    <tr>
    <td colspan="3" align="right">
    <input type="submit" name="_eventId_submit" value="Continue" />

    <input type="submit" name="_eventId_back" value="Back" />
    </td>
    </tr>
    </spring:bind>
    </table>
    </form>
    </body>
    </html>

    Thanks again for your help.

    Dan

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

    Default

    Dan,

    Looks OK to me.

    The only thing I can suggest is:
    <input type="hidden" name="_flowId" value="cart" />

    ... isn't needed, as this view is participating in an existing FlowExecution already associated with a Flow definition (which _flowId identifies for the purpose of launching new flow executions.)

    Still, that could not cause this problem. I don't understand it based on what I've seen so far--but it's clear the _flowExecutionId coming in the HTTP request as a String[] of 2 elements instead of a single String...

    What's even weirder is based on your logs, the two _flowExecutionId values are DIFFERENT:

    java.lang.IllegalArgumentException: The '_flowExecutionId' parameter was unexpectedly set to an array with values: array<String>['B08E8418-491A-2636-BF05-03FDD9567586', '87B3F5AA-4C78-9907-D260-EECD2B396899']; this is likely a view configuration error: make sure you submit a single string value for the '_flowExecutionId' parameter!

    I would expect them to be the same had the view accidently submitted it twice...

    Let me know if you figure out what is causing this. Perhaps a filter thats running before the request is submitted to the webflow system?

    Keith
    Keith Donald
    Core Spring Development Team

  10. #10
    Join Date
    Aug 2004
    Location
    Allentown, PA
    Posts
    141

    Default

    Keith,

    That is a good thing to mention. There is a filter that is intercepting all of my requests. I am using SiteMesh as a templating engine. Could SiteMesh be interfering with, or possibly re-submitting the form? Would a new flowExecutionId be generated because of this? So far, all of my flows have been navigated with links, sending a GET request? I will look into these and report back.

    Dan

Similar Threads

  1. ERROR: Context initialization failed
    By makhlo in forum Architecture
    Replies: 8
    Last Post: Jul 11th, 2008, 01:41 AM
  2. Context initialization failed
    By kanonmicke in forum Container
    Replies: 7
    Last Post: Sep 29th, 2005, 12:35 AM
  3. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  4. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM
  5. Replies: 4
    Last Post: Nov 5th, 2004, 03:59 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
  •