文档章节

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

开源中国段子手
 开源中国段子手
发布于 2016/01/27 10:37
字数 1255
阅读 4810
收藏 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的配置即可。当然不可以全部删除。

© 著作权归作者所有

共有 人打赏支持
上一篇: EL表达式语言(二)
下一篇: EL表达式语言
开源中国段子手
粉丝 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
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
835
1
Tomcat启动报错

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Spr......

rilweic
2015/07/30
557
5
tomcat配置虚拟目录后启动报错?

我在tomcat的server.xml中配置了一个虚拟目录,但是启动会报错,如下图 下面是报错信息,严重: A child container failed during start java.util.concurrent.ExecutionException: org.apac...

路飞鸣人合体
2017/01/31
1K
4
tomcat启动时报异常!!!

SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina......

_谙久
2016/01/27
168
2

没有更多内容

加载失败,请刷新页面

加载更多

Idea

command + E : 打开最近编辑过的文件 command + shift + O : 打开指定文件 command + O : 打开指定类 shift+command+delete 打开上一次编辑过的地方 option + command + t 代码块包含 option...

xpttxsok
31分钟前
2
0
FTP 协议 1.0

自己制作的FTP协议:

Explorer0
42分钟前
2
0
Android 通过DrawableInflater加载自定义Drawable

一、Drawable 在Android系统张,图形图像的绘制需要在画布上进行操作和处理,但是绘制需要了解很多细节以及可能要进行一些复杂的处理,因此系统提供了一个被称之为Drawable的类来进行绘制处理...

IamOkay
53分钟前
3
0
灵活无处安放,所以选择流浪....《漆黑的空间》& 《灰色轨迹》

灵活无处安放,所以选择流浪....《漆黑的空间》& 《灰色轨迹》

yizhichao
59分钟前
1
0
Kafka+Flink 实现准实时异常检测系统

1.背景介绍 异常检测可以定义为“基于行动者(人或机器)的行为是否正常作出决策”,这项技术可以应用于非常多的行业中,比如金融场景中做交易检测、贷款检测;工业场景中做生产线预警;安防...

架构师springboot
今天
7
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部