2

I'm currently evaluating Spring (with a focus on WebFlow) for future projects. After reading lots of docs and articles (most of which didn't help much) I downloaded the current release of Spring WebFlow (2.3.0 at the time of writing) and tried to get the samples running. Apart from solvable, yet frustrating, dependency- and classpath-issues, I hit the first roadblock with the config-files distributed with the samples. First of all, the webflow-config.xml of the booking-mvc-sample isn't even valid.

<?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"
       xsi:schemaLocation="
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/webflow-config
           http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd">

    <!-- Executes flows: the entry point into the Spring Web Flow system -->
    <webflow:flow-executor id="flowExecutor">
        <webflow:flow-execution-listeners>
            <webflow:listener ref="securityFlowExecutionListener" />
        </webflow:flow-execution-listeners>
    </webflow:flow-executor>

    <!-- The registry of executable flow definitions -->
    <webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF">
        <webflow:flow-location-pattern value="/**/*-flow.xml" />
    </webflow:flow-registry>

    <!-- Plugs in a custom creator for Web Flow views -->
    <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator"
        development="true" validator="validator" />

    <!-- Configures Web Flow to use Tiles to create views for rendering; Tiles allows for applying consistent layouts to your views -->
    <bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
        <property name="viewResolvers" ref="tilesViewResolver"/>
        <property name="useSpringBeanBinding" value="true" />
    </bean>

    <!-- Installs a listener to apply Spring Security authorities -->
    <bean id="securityFlowExecutionListener" class="org.springframework.webflow.security.SecurityFlowExecutionListener" />

    <!-- Bootstraps JSR-303 validation and exposes it through Spring's Validator interface -->
    <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>

</beans>
  • cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-executor'.
  • cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-registry'.
  • cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-builder-services'.

Changing http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd to http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd removes the validation errors from Eclipse but the SAXParser still complains at startup.

Is there any way around it? Can someone help me out with a working config or point to a working tutorial (either a correct one if it's the samples fault or one that shown me how to setup SWF correctly if I'm doing it wrong)?

Right now I'm not far from dumping SWF from our list of possible frameworks as "not running out of the box" and - looking at the userbase and prevalence of Spring, this is somehow hard to believe.

Thanks a lot.

Nicktar
  • 5,548
  • 1
  • 28
  • 43
  • Follow this link your problem will solve. http://stackoverflow.com/questions/4825904/how-to-configure-spring-webflow-with-jsf-2-0/21233080#21233080 – Pravin Jan 23 '14 at 14:49

0 Answers0