欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

spring-bean 版本的问题(报错:org.xml.sax.SAXParseException; lineNumber: 14; columnNumber

程序员文章站 2022-12-23 22:22:09
当XML中配置的xsd是4.0,而引用的包是4以下的spring bean.jar时,当服务器能连网时没问题,不能连网时,就报以下类似错误: org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 75; schema_referen ......

当XML中配置的xsd是4.0,而引用的包是4以下的spring-bean.jar时,当服务器能连网时没问题,不能连网时,就报以下类似错误:

org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 75; schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-4.1.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>.

解决方法:将引用的SPRING-bean.jar升级到4以上版本

原 因:当xml中用到了spring-bean-4.1.xsd时,服务器又不能连网,本地从spring-ben.jar中又找不到的话就会报错。