找不到 XML 模式命名空间的 Spring NamespaceHandler [http://www.springframework.org/schema/webflow]
Posted
技术标签:
【中文标题】找不到 XML 模式命名空间的 Spring NamespaceHandler [http://www.springframework.org/schema/webflow]【英文标题】:Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/webflow] 【发布时间】:2013-11-01 00:13:17 【问题描述】:我正在尝试部署我的第一个 Spring webflow 应用程序。但是,我被困了 3 天,出现以下错误:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:配置问题:
我已经阅读了许多文章和论坛,但找不到任何解决方案。
以下是我在 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 配置文件中的 flow xml 而不是 webflow 配置。
【讨论】:
【参考方案2】:我遇到了这个问题。对我来说,问题出在链接到流定义文件的 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 个小时。
【讨论】:
以上是关于找不到 XML 模式命名空间的 Spring NamespaceHandler [http://www.springframework.org/schema/webflow]的主要内容,如果未能解决你的问题,请参考以下文章
找不到 XML 模式命名空间 Application-Context 的 Spring NamespaceHandler
找不到 XML 模式命名空间的 Spring NamespaceHandler [http://www.springframework.org/schema/webflow]
Spring 3.0 -- 无法为 XML 模式命名空间上下文找到 Spring NamespaceHandler
Spring 配置:找不到 Spring NamespaceHandler