2013-10-22 106 views
1

我想部署我的第一個Spring Webflow應用程序。但是,我堅持了3天以下錯誤:無法找到XML名稱空間的Spring NamespaceHandler [http://www.springframework.org/schema/webflow]

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/webflow]

我看過的文章和論壇數量,也沒有找到任何解決方案。

以下是我在pom.xml中添加依賴關係:

<dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-core</artifactId> 
     <version>${spring.version}</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-web</artifactId> 
     <version>${spring.version}</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-webmvc</artifactId> 
     <version>${spring.version}</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-context</artifactId> 
     <version>${spring.version}</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-beans</artifactId> 
     <version>${spring.version}</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-oxm</artifactId> 
     <version>${spring.version}</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.ws</groupId> 
     <artifactId>spring-xml</artifactId> 
     <version>2.1.3.RELEASE</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.webflow</groupId> 
     <artifactId>spring-webflow</artifactId> 
     <version>2.3.2.RELEASE</version> 
    </dependency> 

    <dependency> 
     <groupId>org.springframework.webflow</groupId> 
     <artifactId>spring-binding</artifactId> 
     <version>2.3.2.RELEASE</version> 
    </dependency> 

下面顯示的jar文件類路徑文件中的類路徑

<classpath> 
    <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/> 
    <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/> 
    <classpathentry kind="src" path="src/main/java" including="**/*.java"/> 
    <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/> 
    <classpathentry kind="output" path="target/classes"/> 
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-core/3.2.2.RELEASE/spring-core-3.2.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/3.2.2.RELEASE/spring-context-3.2.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-aop/3.2.2.RELEASE/spring-aop-3.2.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/3.2.2.RELEASE/spring-beans-3.2.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-expression/3.2.2.RELEASE/spring-expression-3.2.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/webflow/spring-webflow/2.3.2.RELEASE/spring-webflow-2.3.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-web/3.2.1.RELEASE/spring-web-3.2.1.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/spring-webmvc/3.2.1.RELEASE/spring-webmvc-3.2.1.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/webflow/spring-binding/2.3.2.RELEASE/spring-binding-2.3.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/webflow/spring-js/2.3.2.RELEASE/spring-js-2.3.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/org/springframework/webflow/spring-js-resources/2.3.2.RELEASE/spring-js-resources-2.3.2.RELEASE.jar"/> 
    <classpathentry kind="var" path="M2_REPO/jstl/jstl/1.2/jstl-1.2.jar"/> 
    <classpathentry kind="var" path="M2_REPO/taglibs/standard/1.1.2/standard-1.1.2.jar"/> 
</classpath> 

請幫助。

回答

1

我整理了一下。我指的是mvc配置文件中的流xml,而不是webflow配置。

0

我有這個問題。對我來說,問題是在web.xml這是鏈接到流程定義文件,這樣的(這是不正確的):

<context-param> 
    <param-name>contextConfigLocation</param-name> 
    <param-value> 
     /WEB-INF/dispatcher-servlet.xml 
     /WEB-INF/myFlow.xml 
    </param-value> 
</context-param> 

本來應該是這樣的(這是正確的):

<context-param> 
    <param-name>contextConfigLocation</param-name> 
    <param-value> 
     /WEB-INF/dispatcher-servlet.xml 
    </param-value> 
</context-param> 

我希望這可以幫助別人,我已經在這裏倒了4個小時。

相關問題