加载ibatis文件出现超时异常的解决办法

年前都好好的工程,今天上班启不了来.错误原因是说2013-02-18 10:17:25.920:WARN::Nested in org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:applicationContext.xml]|Offending resource: ServletContext resource [/WEB-INF/webx.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [sqlmap-config.xml]|Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [sqlmap-config.xml]; nested exception is java.net.ConnectException: Connection timed out: connect:

java.net.ConnectException: Connection timed out: connect

 

大致是说网络异常,第一反应是文件在本地怎么会网络异常,打开文件仔细看了下。

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
	<settings useStatementNamespaces="true"/>
 
     <sqlMap resource="sqlmap/Msgstatistics_sqlmap.xml"/>
    <sqlMap resource="sqlmap/sqlmap_Conf.xml"/>
    <sqlMap resource="sqlmap/Bet_sqlmap.xml"/>
   
</sqlMapConfig>

 我在浏览器里面去访问http://www.ibatis.com/dtd/sql-map-config-2.dtd果然打不开。so.把它换成http://ibatis.apache.org/dtd/sql-map-config-2.dtd就OK了.

你可能感兴趣的:(ibatis)