gpt4 book ai didi

java - 未找到 Spring Webflow 架构 xsd

转载 作者:行者123 更新时间:2023-12-02 11:58:43 24 4
gpt4 key购买 nike

我是 Spring web-flow 的新手。请在下面找到我的流定义文件:

<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.4.xsd">


<view-state id="welcome" view="/welcome.jsp">
<transition on="continue" to="finish" />
<transition on="cancel" to="cancelled" />
</view-state>

<end-state id="cancelled" view="/cancelled.jsp" />
<end-state id="finish" view="/finish.jsp" />
</flow>

我的Spring配置文件如下:

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

<mvc:annotation-driven/>

<context:component-scan base-package="com.order"/>
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/view/" />
<property name="suffix" value=".jsp" />
</bean>

<!-- Webflow Configuration -->
<webflow-config:flow-executor id="flowExecutor"/>

<webflow-config:flow-registry id="flowRegistry">
<webflow-config:flow-location-pattern value="/WEB-INF/spring/webFlowConfig/*-flow.xml"/>
</webflow-config:flow-registry>

<bean id="flowMappings" class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="order" value="0"/>
<property name="flowRegistry" ref="flowRegistry"/>
</bean>

<bean
class="org.springframework.webflow.mvc.servlet.FlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor"/>
</bean>

<import resource="../webFlowConfig/orderweb-flow.xml"/>
</beans>

我使用 weblogic 12.1.3 进行部署。在部署过程中遇到以下错误:

     org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 72; 
schema_reference.4: Failed to read schema document
'http://www.springframework.org/schema/webflow/spring-webflow-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:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:99)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:392)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:306)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4160)
Truncated. see log file for complete stacktrace
Caused By: java.net.ConnectException: Tried all: '5' addresses, but could
not connect over HTTP to server: 'www.springframework.org', port: '80'
at weblogic.net.http.HttpClient.openServer(HttpClient.java:401)
at weblogic.net.http.HttpClient.openServer(HttpClient.java:506)
at weblogic.net.http.HttpClient.New(HttpClient.java:313)
at weblogic.net.http.HttpClient.New(HttpClient.java:292)
at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:267)
Truncated. see log file for complete stacktrace

我有所有相关的jar文件。我还添加了所需的配置web.xml 文件。谁能有任何合适的解决方案吗???

最佳答案

  • 首先,在指定版本号时不使用版本号是一种常见的做法。原因here 。您可以尝试删除版本号。
  • 另一种可能性,也是由于防火墙限制而发生的。

关于java - 未找到 Spring Webflow 架构 xsd,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47415397/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com