org.xml.sax.SAXParseException: Document is invalid: no grammar found.
2022-09-04 02:42:31
我在我的开发机器上的Struts应用程序中收到错误,说显然我的配置文件有错误(我已经检查过了,看起来没问题):
org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 3 column 15: Document is invalid: no grammar found.
org.xml.sax.SAXParseException: Document is invalid: no grammar found.
org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 3 column 15: Document root element "struts-config", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "struts-config", must match DOCTYPE root "null".
显然,在开发计算机上,应用程序设法运行。但是,在部署服务器上,我收到以下错误,我不知道这些错误是否可能相关:
org.apache.struts.action.ActionServlet handleConfigException
SEVERE: Parsing error processing resource path /WEB-INF/struts-config.xml java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
My struts-config.xml 文件: http://pastebin.com/i0XanZZt My web.xml 文件: http://pastebin.com/jMPAdSUm
这里可能出了什么问题?缺少一些 lib?lib 版本不正确(使用最新的 Struts 1 版本)?
提前致谢!