Announcement Announcement Module
Collapse
No announcement yet.
The FlowRegistry to query when mapping requests is required Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The FlowRegistry to query when mapping requests is required

    Hi,

    I've set up a Web Flow project according to the Booking Faces example, and everything was working fine. But since yesterday I get the following errors, when I start my application:

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.webflow.mvc.servlet.FlowHandlerMapping#0' defined in ServletContext resource [/WEB-INF/webflow-config.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: The FlowRegistry to query when mapping requests is required
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
    	[...]
    2011-01-25 08:19:39.796:WARN::Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.webflow.mvc.servlet.FlowHandlerMapping#0' defined in ServletContext resource [/WEB-INF/webflow-config.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: The FlowRegistry to query when mapping requests is required:
    java.lang.IllegalArgumentException: The FlowRegistry to query when mapping requests is required
    	at org.springframework.util.Assert.notNull(Assert.java:112)
    	at org.springframework.webflow.mvc.servlet.FlowHandlerMapping.initServletContext(FlowHandlerMapping.java:85)
    	at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:76)
    	at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
    	at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106)
    	at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    	[...]
    And here is my webflow-config:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:webflow="http://www.springframework.org/schema/webflow-config"
           xmlns:faces="http://www.springframework.org/schema/faces"
           xsi:schemaLocation="
               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
               http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
               http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.0.xsd">
    
        <faces:resources />
    
        <!-- Maps request paths to flows in the flowRegistry; e.g. a path of /hotels/booking looks for a flow with id "hotels/booking" -->
        <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
            <property name="order" value="1"/>
            <property name="flowRegistry" ref="flowRegistry" />
            <property name="defaultHandler">
                <!-- If no flow match, map path to a view to render; e.g. the "/intro" path would map to the view named "intro" --> 
                <bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController" />
            </property>
        </bean>
    
        <!-- Maps logical view names to Facelet templates in /WEB-INF (e.g. 'search' to '/WEB-INF/search.xhtml' -->
        <bean id="faceletsViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
            <property name="viewClass" value="org.springframework.faces.mvc.JsfView"/>
            <property name="prefix" value="/WEB-INF/" />
            <property name="suffix" value=".xhtml" />
        </bean>
    
        <!-- Dispatches requests mapped to org.springframework.web.servlet.mvc.Controller implementations -->
        <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
    
        <!-- Dispatches requests mapped to flows to FlowHandler implementations -->
        <bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
            <property name="flowExecutor" ref="flowExecutor" />
        </bean>
        
        
        <!-- Executes flows: the central entry point into the Spring Web Flow system -->
        <webflow:flow-executor id="flowExecutor">
            <webflow:flow-execution-listeners>
                <webflow:listener ref="facesContextListener"/>
            </webflow:flow-execution-listeners>
        </webflow:flow-executor>
            
        <!-- The registry of executable flow definitions -->
        <webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/flows">
            <webflow:flow-location-pattern value="/**/*-flow.xml" />
        </webflow:flow-registry>
        
        <!-- Configures the Spring Web Flow JSF integration -->
        <faces:flow-builder-services id="facesFlowBuilderServices" development="true" />
    
        <!-- Installs a listener that creates and releases the FacesContext for each request. -->
        <bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>
        
    </beans>
    I changed nothing... but something must have changed. Does anybody have an idea where to start?

    My Environment:
    - Spring 3.0.4.RELEASE
    - Spring Webflow 2.2.0.RELEASE
    - maven-jetty-plugin 6.1.25
    - RichFaces 3.3.3.Final

    Any help is appreciated

  • #2
    A collegue of mine found the cause.
    It was one of our beans, which messed up the config.

    Comment


    • #3
      hi, I have the same problem now, could you tell me which bean is mis-configured? so that I can check my beans by your example, ths~!

      Comment

      Working...
      X