java.lang.IllegalArgumentException: This flow 'new-entry-flow' already contains a state with id 'save' -- state ids must be locally unique to the flow definition; existing state-ids of this flow include: array<String>['start', 'start', 'input', 'save']

Spring JIRA | Serge Bogatyrjov | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    When requesting the same flow from two browser windows simultaneously after the application start we get error in one window. From the log it is obvious that the flow is created simultaneously in two request processing threads. 10:08:41 [INFO] resin-tcp-connection-*:8080-23:org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/opt/com/caucho/resin/resin-current/webapps/test/WEB-INF/classes/flows/new-entry-flow-beans.xml] 10:08:41 [INFO] resin-tcp-connection-*:8080-21:org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/opt/com/caucho/resin/resin-current/webapps/test/WEB-INF/classes/flows/new-entry-flow-beans.xml] 10:08:43 [DEBUG] resin-tcp-connection-*:8080-23:org.springframework.web.servlet.DispatcherServlet - Cleared thread-bound request context: HttpRequest[11] 10:08:43 [ERROR] resin-tcp-connection-*:8080-23:org.springframework.web.servlet.DispatcherServlet - Could not complete request java.lang.IllegalArgumentException: This flow 'new-entry-flow' already contains a state with id 'save' -- state ids must be locally unique to the flow definition; existing state-ids of this flow include: array<String>['start', 'start', 'input', 'save'] at org.springframework.webflow.Flow.add(Flow.java:202) at org.springframework.webflow.State.setFlow(State.java:119) at org.springframework.webflow.builder.DefaultFlowArtifactFactory.createState(DefaultFlowArtifactFactory.java:123) at org.springframework.webflow.builder.XmlFlowBuilder$LocalFlowArtifactFactory.createState(XmlFlowBuilder.java:1149) at org.springframework.webflow.builder.XmlFlowBuilder.parseActionState(XmlFlowBuilder.java:599) at org.springframework.webflow.builder.XmlFlowBuilder.addStateDefinitions(XmlFlowBuilder.java:550) at org.springframework.webflow.builder.XmlFlowBuilder.buildStates(XmlFlowBuilder.java:534) at org.springframework.webflow.builder.FlowAssembler.assembleFlow(FlowAssembler.java:111) at org.springframework.webflow.registry.RefreshableFlowHolder.assembleFlow(RefreshableFlowHolder.java:121) at org.springframework.webflow.registry.RefreshableFlowHolder.getFlow(RefreshableFlowHolder.java:76) at org.springframework.webflow.registry.FlowRegistryImpl.getFlow(FlowRegistryImpl.java:170) at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.createFlowExecution(AbstractFlowExecutionRepository.java:76) at org.springframework.webflow.executor.FlowExecutorImpl.launch(FlowExecutorImpl.java:154) at org.springframework.webflow.executor.support.FlowRequestHandler.handleFlowRequest(FlowRequestHandler.java:117) at org.springframework.webflow.executor.mvc.FlowController.handleRequestInternal(FlowController.java:198) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)

    Spring JIRA | 1 decade ago | Serge Bogatyrjov
    java.lang.IllegalArgumentException: This flow 'new-entry-flow' already contains a state with id 'save' -- state ids must be locally unique to the flow definition; existing state-ids of this flow include: array<String>['start', 'start', 'input', 'save']
  2. 0

    When requesting the same flow from two browser windows simultaneously after the application start we get error in one window. From the log it is obvious that the flow is created simultaneously in two request processing threads. 10:08:41 [INFO] resin-tcp-connection-*:8080-23:org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/opt/com/caucho/resin/resin-current/webapps/test/WEB-INF/classes/flows/new-entry-flow-beans.xml] 10:08:41 [INFO] resin-tcp-connection-*:8080-21:org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from file [/opt/com/caucho/resin/resin-current/webapps/test/WEB-INF/classes/flows/new-entry-flow-beans.xml] 10:08:43 [DEBUG] resin-tcp-connection-*:8080-23:org.springframework.web.servlet.DispatcherServlet - Cleared thread-bound request context: HttpRequest[11] 10:08:43 [ERROR] resin-tcp-connection-*:8080-23:org.springframework.web.servlet.DispatcherServlet - Could not complete request java.lang.IllegalArgumentException: This flow 'new-entry-flow' already contains a state with id 'save' -- state ids must be locally unique to the flow definition; existing state-ids of this flow include: array<String>['start', 'start', 'input', 'save'] at org.springframework.webflow.Flow.add(Flow.java:202) at org.springframework.webflow.State.setFlow(State.java:119) at org.springframework.webflow.builder.DefaultFlowArtifactFactory.createState(DefaultFlowArtifactFactory.java:123) at org.springframework.webflow.builder.XmlFlowBuilder$LocalFlowArtifactFactory.createState(XmlFlowBuilder.java:1149) at org.springframework.webflow.builder.XmlFlowBuilder.parseActionState(XmlFlowBuilder.java:599) at org.springframework.webflow.builder.XmlFlowBuilder.addStateDefinitions(XmlFlowBuilder.java:550) at org.springframework.webflow.builder.XmlFlowBuilder.buildStates(XmlFlowBuilder.java:534) at org.springframework.webflow.builder.FlowAssembler.assembleFlow(FlowAssembler.java:111) at org.springframework.webflow.registry.RefreshableFlowHolder.assembleFlow(RefreshableFlowHolder.java:121) at org.springframework.webflow.registry.RefreshableFlowHolder.getFlow(RefreshableFlowHolder.java:76) at org.springframework.webflow.registry.FlowRegistryImpl.getFlow(FlowRegistryImpl.java:170) at org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.createFlowExecution(AbstractFlowExecutionRepository.java:76) at org.springframework.webflow.executor.FlowExecutorImpl.launch(FlowExecutorImpl.java:154) at org.springframework.webflow.executor.support.FlowRequestHandler.handleFlowRequest(FlowRequestHandler.java:117) at org.springframework.webflow.executor.mvc.FlowController.handleRequestInternal(FlowController.java:198) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)

    Spring JIRA | 1 decade ago | Serge Bogatyrjov
    java.lang.IllegalArgumentException: This flow 'new-entry-flow' already contains a state with id 'save' -- state ids must be locally unique to the flow definition; existing state-ids of this flow include: array<String>['start', 'start', 'input', 'save']

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      This flow 'new-entry-flow' already contains a state with id 'save' -- state ids must be locally unique to the flow definition; existing state-ids of this flow include: array<String>['start', 'start', 'input', 'save']

      at org.springframework.webflow.Flow.add()
    2. org.springframework.webflow
      FlowRegistryImpl.getFlow
      1. org.springframework.webflow.Flow.add(Flow.java:202)
      2. org.springframework.webflow.State.setFlow(State.java:119)
      3. org.springframework.webflow.builder.DefaultFlowArtifactFactory.createState(DefaultFlowArtifactFactory.java:123)
      4. org.springframework.webflow.builder.XmlFlowBuilder$LocalFlowArtifactFactory.createState(XmlFlowBuilder.java:1149)
      5. org.springframework.webflow.builder.XmlFlowBuilder.parseActionState(XmlFlowBuilder.java:599)
      6. org.springframework.webflow.builder.XmlFlowBuilder.addStateDefinitions(XmlFlowBuilder.java:550)
      7. org.springframework.webflow.builder.XmlFlowBuilder.buildStates(XmlFlowBuilder.java:534)
      8. org.springframework.webflow.builder.FlowAssembler.assembleFlow(FlowAssembler.java:111)
      9. org.springframework.webflow.registry.RefreshableFlowHolder.assembleFlow(RefreshableFlowHolder.java:121)
      10. org.springframework.webflow.registry.RefreshableFlowHolder.getFlow(RefreshableFlowHolder.java:76)
      11. org.springframework.webflow.registry.FlowRegistryImpl.getFlow(FlowRegistryImpl.java:170)
      11 frames
    3. Spring Web Flow
      FlowExecutorImpl.launch
      1. org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository.createFlowExecution(AbstractFlowExecutionRepository.java:76)
      2. org.springframework.webflow.executor.FlowExecutorImpl.launch(FlowExecutorImpl.java:154)
      2 frames
    4. Spring Web Flow
      FlowController.handleRequestInternal
      1. org.springframework.webflow.executor.support.FlowRequestHandler.handleFlowRequest(FlowRequestHandler.java:117)
      2. org.springframework.webflow.executor.mvc.FlowController.handleRequestInternal(FlowController.java:198)
      2 frames
    5. Spring MVC
      AbstractController.handleRequest
      1. org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    7. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
      3 frames