Announcement Announcement Module
Collapse
No announcement yet.
Updating to Spring 4 woes - no declaration 'webflow:flow-executor'. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Updating to Spring 4 woes - no declaration 'webflow:flow-executor'.

    Hi All,

    I am trying to upgrade from Spring 3.2.4 to Spring 4.0. I am having issues right away in regard to webflow (spring-webflow:2.3.2).

    My initial issues was the following:

    Code:
     
     nested exception is java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.isPresent(Ljava/lang/String;)
    So I attempted to upgrade webflow to 2.4.0 RC1. However, I now encounter the following:

    Code:
     
     The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-executor


    I've tried with both the namespace http://www.springframework.org/schem...config-2.4.xsd as well as downloading a local copy and I get the same error. Intellij auto completes fine and will throw validation efforts, but I cannot get Tomcat to load my configuration.

    Any help is greatly appreciated.

  • #2
    XML Conifg. (I removed a few beans because it was too large)

    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:p="http://www.springframework.org/schema/p"       
           xsi:schemaLocation=" http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
               http://www.springframework.org/schema/webflow-config
               http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd">
    
        <import resource="spring-configuration/propertyFileConfigurer.xml" />
    
        <!-- Theme Resolver -->
        <bean id="themeResolver" class="org.jasig.cas.services.web.ServiceThemeResolver"
            p:defaultThemeName="${cas.themeResolver.defaultThemeName}"
            p:argumentExtractors-ref="argumentExtractors"
            p:servicesManager-ref="servicesManager">
            <property name="mobileBrowsers">
                <map>
                    <entry key=".*iPhone.*" value="iphone" />
                    <entry key=".*Android.*" value="iphone" />
                    <entry key=".*Safari.*Pre.*" value="iphone" />
                    <entry key=".*Nokia.*AppleWebKit.*" value="iphone" />
                </map>
            </property>
        </bean>
    
        <!-- View Resolver -->
        <bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver"
            p:order="0">
            <property name="basenames">
                <list>
                    <value>${cas.viewResolver.basename}</value>
                    <value>protocol_views</value>
                </list>
            </property>
        </bean>
        
        <!-- Locale Resolver -->
        <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver" />
            
        <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
        
        <bean id="urlBasedViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"
            p:viewClass="org.springframework.web.servlet.view.InternalResourceView"
            p:prefix="/WEB-INF/view/jsp/"
            p:suffix=".jsp"
            p:order="1"/>
        
        <bean id="errorHandlerResolver" class="org.jasig.cas.web.NoSuchFlowExecutionExceptionResolver" />
    
        <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
        
        <bean
            id="handlerMappingC"
            class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property
                name="mappings">
                <props>
                    <prop
                        key="/logout">
                        logoutController
                    </prop>
                    <prop
                        key="/serviceValidate">
                        serviceValidateController
                    </prop>
                    <prop
                        key="/validate">
                        legacyValidateController
                    </prop>
                    <prop
                        key="/proxy">
                        proxyController
                    </prop>
                    <prop
                        key="/proxyValidate">
                        proxyValidateController
                    </prop>
                    <prop
                        key="/samlValidate">
                        samlValidateController
                    </prop>
    
                    <prop
                        key="/services/loggedOut.html">
                        serviceLogoutViewController
                    </prop>
    
                    <prop key="/services/viewStatistics.html">
                        viewStatisticsController
                    </prop>
                
                    <prop key="/services/*">manageRegisteredServicesMultiActionController</prop>
                    <prop key="/openid/*">openIdProviderController</prop>
                    <prop key="/authorizationFailure.html">passThroughController</prop>
                    <prop key="/403.html">passThroughController</prop>
                </props>
            </property>
            <property
                name="alwaysUseFullPath" value="true" />
            <!--
            uncomment this to enable sending PageRequest events. 
            <property
                name="interceptors">
                <list>
                    <ref bean="pageRequestHandlerInterceptorAdapter" />
                </list>
            </property>
             -->
        </bean>
    
        <bean id="passThroughController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController" /> 
        
        <bean
            id="openIdProviderController"
            class="org.jasig.cas.web.OpenIdProviderController"
            p:loginUrl="${cas.securityContext.casProcessingFilterEntryPoint.loginUrl}" />
        
        <bean
            id="serviceLogoutViewController"
            class="org.springframework.web.servlet.mvc.ParameterizableViewController"
            p:viewName="serviceLogoutView" />
    
        <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping" p:flowRegistry-ref="flowRegistry" p:order="2">
            <property name="interceptors">
                <ref local="localeChangeInterceptor" />
            </property>
        </bean>
    
    
         <bean class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter"
            p:flowExecutor-ref="flowExecutor"
            p:flowUrlHandler-ref="flowUrlHandler" />
     
        <bean id="flowUrlHandler" class="org.jasig.cas.web.flow.CasDefaultFlowUrlHandler" />
    
        <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
            <webflow:flow-execution-attributes>
                <webflow:always-redirect-on-pause value="false" />
            </webflow:flow-execution-attributes>
        </webflow:flow-executor>
    
        <webflow:flow-registry id="flowRegistry" flow-builder-services="builder">
            <webflow:flow-location path="/WEB-INF/login-webflow.xml" id="login" />
        </webflow:flow-registry>
    
        <webflow:flow-builder-services id="builder" view-factory-creator="viewFactoryCreator" expression-parser="expressionParser" />
    
        <bean id="expressionParser" class="org.springframework.webflow.expression.WebFlowOgnlExpressionParser" />
    
        <bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
            <property name="viewResolvers">
                <list>
                    <ref local="viewResolver" />
                </list>
            </property>
        </bean>
        <bean id="proxyValidateController" class="org.jasig.cas.web.ServiceValidateController"
            p:centralAuthenticationService-ref="centralAuthenticationService"
            p:proxyHandler-ref="proxy20Handler"
            p:argumentExtractor-ref="casArgumentExtractor" />
    
        <bean id="serviceValidateController" class="org.jasig.cas.web.ServiceValidateController"
            p:validationSpecificationClass="org.jasig.cas.validation.Cas20WithoutProxyingValidationSpecification"
            p:centralAuthenticationService-ref="centralAuthenticationService"
            p:proxyHandler-ref="proxy20Handler"
            p:argumentExtractor-ref="casArgumentExtractor" />
        
        <bean id="samlValidateController" class="org.jasig.cas.web.ServiceValidateController"
            p:validationSpecificationClass="org.jasig.cas.validation.Cas20WithoutProxyingValidationSpecification"
            p:centralAuthenticationService-ref="centralAuthenticationService"
            p:proxyHandler-ref="proxy20Handler"
            p:argumentExtractor-ref="samlArgumentExtractor"
            p:successView="casSamlServiceSuccessView"
            p:failureView="casSamlServiceFailureView" />
    
        <bean id="legacyValidateController" class="org.jasig.cas.web.ServiceValidateController"
            p:proxyHandler-ref="proxy10Handler"
            p:successView="cas1ServiceSuccessView"
            p:failureView="cas1ServiceFailureView"
            p:validationSpecificationClass="org.jasig.cas.validation.Cas10ProtocolValidationSpecification"
            p:centralAuthenticationService-ref="centralAuthenticationService"
            p:argumentExtractor-ref="casArgumentExtractor" />
    
        <bean id="proxyController" class="org.jasig.cas.web.ProxyController"
            p:centralAuthenticationService-ref="centralAuthenticationService" />
    
        <bean id="viewStatisticsController" class="org.jasig.cas.web.StatisticsController"
            p:casTicketSuffix="${host.name}">
            <constructor-arg index="0" ref="ticketRegistry" />
        </bean>
    
        <bean id="logoutController" class="org.jasig.cas.web.LogoutController"
            p:centralAuthenticationService-ref="centralAuthenticationService"
            p:logoutView="casLogoutView"
            p:warnCookieGenerator-ref="warnCookieGenerator"
            p:ticketGrantingTicketCookieGenerator-ref="ticketGrantingTicketCookieGenerator" />
        
        <bean id="initialFlowSetupAction" class="org.jasig.cas.web.flow.InitialFlowSetupAction"
            p:argumentExtractors-ref="argumentExtractors"
            p:warnCookieGenerator-ref="warnCookieGenerator"
            p:ticketGrantingTicketCookieGenerator-ref="ticketGrantingTicketCookieGenerator" />
        
        <bean id="authenticationViaFormAction" class="org.jasig.cas.web.flow.AuthenticationViaFormAction"
            p:centralAuthenticationService-ref="centralAuthenticationService"
            p:warnCookieGenerator-ref="warnCookieGenerator" />
        
        <bean id="generateServiceTicketAction" class="org.jasig.cas.web.flow.GenerateServiceTicketAction"
            p:centralAuthenticationService-ref="centralAuthenticationService" />
            
        <bean id="sendTicketGrantingTicketAction" class="org.jasig.cas.web.flow.SendTicketGrantingTicketAction"
            p:centralAuthenticationService-ref="centralAuthenticationService"
            p:ticketGrantingTicketCookieGenerator-ref="ticketGrantingTicketCookieGenerator" />
    
    
    </beans>

    Comment


    • #3
      Code:
      org.xml.sax.SAXParseException; lineNumber: 138; columnNumber: 75; schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
      When I try to read the XSD locally (xsd in same folder as config xml)

      Code:
      09:39:04,082 WARN  [XmlBeanDefinitionReader                 ] - Ignored XML validation warning
      org.xml.sax.SAXParseException; lineNumber: 138; columnNumber: 75; schema_reference.4: Failed to read schema document 'spring-webflow-config-2.4.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
      Last edited by wsantas; May 7th, 2014, 09:42 AM.

      Comment


      • #4
        This issue is now resolved. It appears gradle had some old dependencies that were not cleaned which was causing the error.

        Comment

        Working...
        X