異常:spring
org.xml.sax.SAXParseException; lineNumber: 78; columnNumber: 69; schema_reference.4: 沒法讀取方案文檔 'http://www.springframework.org/schema/tx/spring-tx-3.2.xsd', 緣由爲 1) 沒法找到文檔; 2) 沒法讀取文檔; 3) 文檔的根元素不是 <xsd:schema>。.net
Line 78 in XML document from class path resource [biz-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 78; columnNumber: 69; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但沒法找到元素 'tx:annotation-driven' 的聲明。xml
緣由是由於blog
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd">文檔
在鏈接外網正常狀況下 經過 xmlns="http://www.springframework.org/schema/beans 連接能夠遠程獲取spring-task-3.2.xsd 配置文件信息,可是當遠程連接出現異常時就會經過xsi:schemaLocation加載本地項目工程spring-tx-3.2.6.RELEASE.jar包中的spring.schemas文件中路徑獲取spring-task-3.2.xsd 配置文件(http\://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd),全部若是spring-tx-3.2.6.RELEASE.jar包中的spring.schemas文件沒有http\://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd路徑,則下載更高級版本的包或低版本的jar包,而且查看是否有http\://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd配置路徑。io
資料路徑:class
https://blog.csdn.net/dingqinghu/article/details/46758671配置