错误:
aused by: struts.apache.org - [unknown location]
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:885)
... 34 more
Caused by: java.net.UnknownHostException: struts.apache.org
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
... 35 more
2011-2-9 10:16:53 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2011-2-9 10:16:53 org.apache.catalina.core.StandardContext start
严重: Context [/Arms_Collect] startup failed due to previous errors
2011-2-9 10:16:53 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
解决办法:
就是因为断网了,不能download DTD了所以就报错,解决方法是:
根据DTD中的这个http://struts.apache.org/dtds/struts-2.0.dtd链接将struts-2.0.dtd文件下载到本地硬盘上,然后将DTD中的http://struts.apache.org/dtds/struts-2.0.dtd链接替换成,struts-2.0.dtd文件在硬盘上的路径即可。
具体:
将
struts.xml
中的
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
">
<!DOCTYPE struts PUBLIC
"Apache SoftWare Foundation//DTD Struts Configuration 2.0//EN"
"D:/Anther-hlep-lib-jar/struts-2.0.dtd">
注解:D:/Anther-hlep-lib-jar/struts-2.0.dtd 为struts-2.0.dtd 在我本地纸盘的路径