Document is invalid: no grammar found. at (null:3:8)
来源:互联网 发布:无间隙拼图软件 编辑:程序博客网 时间:2024/05/21 08:58
严重: Document is invalid: no grammar found. at (null:3:8)
org.xml.sax.SAXParseException: Document is invalid: no grammar found.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
省略....
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2012-8-17 15:37:11 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
file:/D:/Tomcat%206.0/webapps/Struts2UserLogin/WEB-INF/classes/struts.xml:3:8
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:835)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
省略...
Caused by: Document is invalid: no grammar found. - file:/D:/Tomcat%206.0/webapps/Struts2UserLogin/WEB-INF/classes/struts.xml:3:8
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:830)
... 34 more
Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
省略...
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:121)
... 35 more
2012-8-17 15:37:11 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2012-8-17 15:37:11 org.apache.catalina.core.StandardContext start
严重: Context [/Struts2UserLogin] startup failed due to previous errors
2012-8-17 15:37:11 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-8-17 15:37:11 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2012-8-17 15:37:11 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/30 config=null
2012-8-17 15:37:11 org.apache.catalina.startup.Catalina start
信息: Server startup in 1758 ms
struts.xml配置文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<struts>
<!-- 加入默认的struts2配置文件 -->
<include file="struts-default.xml" />
<!-- 继承默认的struts2配置文件,概念与Java继承类似 -->
<package name="default" extends="struts-default" >
<!-- 此处hello名称是hello.action的url名字 -->
<action name="hello" class="controller.HelloAction" >
<!-- success指向配置 -->
<result name="success">success.html</result>
</action>
</package>
</struts>
因为在struts.xml文件中缺少了DOCTYPT定义,在文件中加入:
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
即可,正确的配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<!-- 加入默认的struts2配置文件 -->
<include file="struts-default.xml" />
<!-- 继承默认的struts2配置文件,概念与Java继承类似 -->
<package name="default" extends="struts-default" >
<!-- 此处hello名称是hello.action的url名字 -->
<action name="hello" class="controller.HelloAction" >
<!-- success指向配置 -->
<result name="success">success.html</result>
</action>
</package>
</struts>
- Document is invalid: no grammar found. at (null:3:8)
- Struts2 常见错误 Document is invalid: no grammar found. at (null:3:8)
- Document is invalid: no grammar found.异常解决
- struts.xml报异常Document is invalid: no grammar found.
- 关于Struts中Validate验证框架的问题: Document is invalid: no grammar found.
- org.xml.sax.SAXParseException: Document is invalid: no grammar found.搭建Struts2项目报错
- Struts2文件校验报错:Document is invalid: no grammar found.
- Invalid content was found starting with element No child element is expected at this point.
- Invalid content was found starting with element No child element is expected at this point.
- d: Invalid content was found starting with element 'd:skin'. No child element is expected at this po
- document.getElementById(...) is null
- document.body is null
- ERROR ITMS-9000: "Invalid Image Path - No image found at the path referenced under key 'CFBundleIcon
- Invalid Image Path - No image found at the path referenced under key 'CFBundleIconFile': 'Icon.png'
- ERROR ITMS-90032 : "Invalid Image Path - No image found at the path referenced under key 'CFBundleIc
- ERROR ITMS-90032: "Invalid Image Path - No image found at the path referenced under key 'CFBundkeIco
- ERROR ITMS-90032:“Invalid Image Path - No image found at the path referenced under key 'CFBundleIcon
- TypeError: document.getElementById(...) is null
- vs2005控件乱码解决
- S3C6410开发全纪录(三)《UBOOT中添加DM9000AE网卡驱动》 .
- Tomcat配置多个Service,多个同名的应用运行在一个tomcat下
- cp 直接覆盖 的方法
- Java继承时构造函数的调用
- Document is invalid: no grammar found. at (null:3:8)
- html中background-image属性的设置
- python 安装模块的总结
- 转一个解析linux内核I2C体系结构的例子,说的比较清楚 .
- XCode下的iOS单元测试
- 修改liunx的预读区大小
- Nginx warn] the "log_format"
- 排序算法总结(c#版)
- 【windows8开发】现有代码移植到Metro App所必须的API整合