文档章节

启动tomcat出错:A child container failed during start

开源中国段子手
 开源中国段子手
发布于 2016/01/27 10:37
字数 1255
阅读 4614
收藏 0

eclipse中启动tomcat出错,错误如下:

一月 27, 2016 10:29:37 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:JSPStudy' did not find a matching property.
一月 27, 2016 10:29:37 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:JavaBean' did not find a matching property.
一月 27, 2016 10:29:37 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Servlet' did not find a matching property.
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.65
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Oct 9 2015 08:36:58 UTC
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.65.0
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Linux
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            3.18.0-kali3-amd64
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             /opt/jdk1.8.0_60/jre
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_60-b27
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         /opt/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         /opt/apache-tomcat-7.0.65
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=/opt/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=/opt/apache-tomcat-7.0.65
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=/opt/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=/opt/apache-tomcat-7.0.65/endorsed
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
一月 27, 2016 10:29:37 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
一月 27, 2016 10:29:37 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
一月 27, 2016 10:29:37 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
一月 27, 2016 10:29:37 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 706 ms
一月 27, 2016 10:29:37 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
一月 27, 2016 10:29:37 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.65
一月 27, 2016 10:29:38 上午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Servlet]]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1122)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Servlet]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [LoginServlet] and [com.zhong.model.LoginServlet] are both mapped to the url-pattern [/LoginServlet] which is not permitted
    at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
    at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2428)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2103)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2064)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1304)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5405)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more

一月 27, 2016 10:29:38 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
一月 27, 2016 10:29:38 上午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1122)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1130)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more

一月 27, 2016 10:29:38 上午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:739)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1130)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

一月 27, 2016 10:29:38 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8080"]
一月 27, 2016 10:29:38 上午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-bio-8009"]
一月 27, 2016 10:29:38 上午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
一月 27, 2016 10:29:38 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-bio-8080"]
一月 27, 2016 10:29:38 上午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["ajp-bio-8009"]


错误的原因一般是:

你同时在servlet和web.xml中配置了servlet

解决办法:

Servlet 3.0开始支持用@WebServlet注解来代替web.xml里的配置servlet的作用,我在开始的servlet里面配置了@WebServlet

只需要删除servlet中的@WebServlet("/LoginServlet")

或者删除web.xml中关于此servlet的配置即可。当然不可以全部删除。

© 著作权归作者所有

共有 人打赏支持
开源中国段子手
粉丝 43
博文 178
码字总数 95519
作品 0
南京
程序员
tomcat7-maven-plugin启动maven项目异常

最近用intellij idea新建了一套maven web项目,用tomcat7-maven-plugin运行(直接运行程序,不是war包)。 项目集成了Spring MVC框架,对jsp页面的处理依赖下面两个jar包: <dependency> <gr...

xiaolgoon
2015/09/06
558
0
tomcat7下spring3.2与mybatis3.1的兼容

我在tomcat7下集成spring3.2和mybatis3.1,发现一个问题: 如果spring-web.jar和mybaits-3.1.1.jar同时引入的话,tomcat启动时会报:a child container failed during start的错误,导致系统...

nick_chen
2012/11/11
1K
4
idea在启动tomcat插件时报错

以下是报错信息 八月 12, 2016 4:10:16 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-bio-8080"] 八月 12, 2016 4:10:16 下午 org.apache.cat......

1079403599
2016/08/12
749
1
A child container failed during start

启动Java Web项目时提示错误:A child container failed during start 提示:A child container failed during start 从来都不是问题的根本原因! 完整错误信息如下: 严重: A child contain...

微wx笑
2014/12/09
0
0
解决:A child container failed during start

新弄的电脑,项目怎么都启动不了,Tomcat一启动就报错: 以“A child container failed during start”为关键字找,基本上都说是Tomcat版本太高了,但是我觉得没那么简单,因为我以前的电脑跑...

吃兔纸不吐毛
03/01
0
0

没有更多内容

加载失败,请刷新页面

加载更多

你为什么在Redis里读到了本应过期的数据

一个事故的故事 晚上睡的正香突然被电话吵醒,对面是开发焦急的声音:我们的程序在访问redis的时候读到了本应过期的key导致整个业务逻辑出了问题,需要马上解决。 看到这里你可能会想:这是不...

IT--小哥
今天
2
0
祝大家节日快乐,阖家幸福! centos GnuTLS 漏洞

yum update -y gnutls 修复了GnuTLS 漏洞。更新到最新 gnutls.x86_64 0:2.12.23-22.el6 版本

yizhichao
昨天
5
0
Scrapy 1.5.0之选择器

构造选择器 Scrapy选择器是通过文本(Text)或 TextResponse 对象构造的 Selector 类的实例。 它根据输入类型自动选择最佳的解析规则(XML vs HTML): >>> from scrapy.selector import Sele...

Eappo_Geng
昨天
4
0
Windows下Git多账号配置,同一电脑多个ssh-key的管理

Windows下Git多账号配置,同一电脑多个ssh-key的管理   这一篇文章是对上一篇文章《Git-TortoiseGit完整配置流程》的拓展,所以需要对上一篇文章有所了解,当然直接往下看也可以,其中也有...

morpheusWB
昨天
5
0
中秋快乐!!!

HiBlock
昨天
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部