XSD、dtd不聯網情況下可能出現的報錯。

XSD不聯網情況下可能出現的報錯。不是必現。貌似可以去掉版本號或者配置本地路徑,不過聯網就好了,暫時沒處理。

 

2015-10-03 20:18:19,468 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Line 1 in XML document from file [E:\xxxxx\server\default\deploy\XXXX\WEB-INF\classes\conf\sql-map-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
Caused by:
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.

XML content:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
        "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>


2015-10-03 15:56:41,640 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Line 5 in XML document from file [E:\XXXX\server\default\deploy\jbossweb-tomcat55.sar\conf\web.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'.
Caused by:
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'.

 

XML content:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
   version="2.4">

 

 

---------------------------再次出現----------------------

到jar包中把DTD拷貝到本地目錄,把DTD路徑指向本地路徑

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章