【问题标题】:org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans.xsd'org.xml.sax.SAXParseException:schema_reference.4:无法读取架构文档“http://www.springframework.org/schema/beans/spring-beans.xsd”
【发布时间】:2021-11-27 16:32:12
【问题描述】:

我在尝试执行 spring 批处理时遇到以下错误

2021-10-07T13:10:19,229 [main] WARN  XmlBeanDefinitionReader: Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans.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) ~[?:1.8.0_265]

我尝试再次运行它,它被执行了但是我想确保上述错误不会重复。

这是什么原因造成的?如何永久解决此问题。

【问题讨论】:

    标签: java spring spring-batch


    【解决方案1】:

    网络问题,因为错误将 502 作为根本原因,这是一个坏网关。 XSD 文件已添加到 spring 的 jar 中,因此无需上网即可找到它

    https://qnatech.wordpress.com/2012/08/21/how-to-resolve-spring-xsd-schema-error-schema_reference-4-failed-to-read-schema-document/

    【讨论】:

      猜你喜欢
      • 2015-11-01
      • 2015-05-17
      • 1970-01-01
      • 1970-01-01
      • 2019-08-19
      • 2012-09-01
      • 1970-01-01
      • 2014-12-04
      • 2015-06-10
      相关资源
      最近更新 更多