eclipse中不能启动tomcat问题
在eclipse 启动tomcat 时候, 控制台给出这样的错误:
2007-5-13 21:57:52 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
2007-5-13 21:57:53 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config= 'org.apache.struts.util.LocalStrings ', returnNull=true
2007-5-13 21:57:53 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config= 'org.apache.struts.action.ActionResources ', returnNull=true
2007-5-13 21:57:54 org.apache.struts.util.PropertyMessageResources <init>
信息: Initializing, config= 'org.apache.webapp.admin.ApplicationResources ', returnNull=true
2007-5-13 21:57:55 org.apache.commons.digester.Digester error
严重: Parse Error at line 6 column 52: Document root element "web-app ", must match DOCTYPE root "null ".
org.xml.sax.SAXParseException: Document root element "web-app ", must match DOCTYPE root "null ".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:220)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:579)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:181)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3523)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:774)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:760)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:548)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:260)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:741)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:512)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:354)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:671)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1149)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
[解决办法]
帮你顶一个!
[解决办法]
好象是配置文件报错:
Parse Error at line 6 column 52: Document root element "web-app ", must match DOCTYPE root "null ".
org.xml.sax.SAXParseException: Document root element "web-app ", must match DOCTYPE root "null ".
lz要不换个tomcat5试试。
[解决办法]
web.xml这个配置文件的解析错误
初步怀疑是版本错误
建议用高版本的tomcat
[解决办法]
web.xml文件有问题.
<web-app xmlns= "http://java.sun.com/xml/ns/j2ee "
xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance " version= "2.4 "
xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
这是eclipse3.1 myeclipse中的 "web-app " 的一段
注意到这里面 web-app_2_4.xsd 是2.4版的。
问题很可能出在 Tomcat 4 中的 web.xml文件不支持 2.4 ,Tomcat4中的好象是 2.3或更低
建议将Tomcat使用 最新的 Tomcat6.0.10.
[解决办法]
换个Tomcat5以上的。。。