Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-1004

When handling exceptions <on-start> flow execution key is not set and that causes an IllegalStateException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.0.6
    • Component/s: Core: Flow Executor
    • Labels:
      None

      Description

      see http://forum.springsource.org/showthread.php?p=218852

      I have an evaluate expression on-start. If it fires an exception it is catched by my exceptionhandler and converted to a message to be displayed to the user.
      But the problem is that, as the flow continues (given that the exception is already handled), when it tries to call putFlowExecution(...) it fires another exception because flow has not been fully started yet.

      SEVERE: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception
      java.lang.IllegalStateException: The key for the flow execution is null; make sure the key is assigned first. Execution Details = [[email protected] flow = 'lookupCustomer', flowSessions = list[[[email protected] flow = 'lookupCustomer', state = 'lookupCustomer', scope = map[[empty]]]]]
      at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.assertKeySet(AbstractFlowExecutionRepository.java:189)
      at org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.putFlowExecution(DefaultFlowExecutionRepository.java:108)
      at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:142)
      at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
      at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:172)
      at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)

        Attachments

          Activity

            People

            Assignee:
            kdonald Keith Donald
            Reporter:
            triqui Triqui Galletas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: