Server Tomcat v*.* Server at localhost failed to start.

原创 2016年06月12日 21:09:21

Tomcat 无法启动

解法提示:问题的突破口——先解决类似于

Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log; 
及
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log


”等等这种明显的缺包错误。

对于这个错误在网上有太多的表述,总结如下:

(1)web.xml中的<url-pattern>/*</url-pattern>书写错了:这个路径的最前面必须以"/"开头,代表在classpath路径下。

(2)web.xml的头文件的版本号过高了:若是3.0以上,将其换成2.5等等(摘一个示例如下):

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
(3)部分jar的版本问题,造成该错误。有人指出删除下面的包,错误得解:

 icu4j-2.6.1.jar 、 jdom-1.0.jar、xalan-2.6.0.jar、xercesImpl-2.8.1.jar、xml-apis-1.3.02.jar、xmlParserAPIs-2.6.2.jar、xom-1.0.jar 。

还有的朋友赞成此观点,但是其他jar造成的。

(4)我的情况是:同样的jar包,放在maven中与放在lib下——是不同的。放在lib下,则不报此错误(为什么?)。

总结一句话:报“A child container failed during start”错误,造成的原因较多,总结为两方面:①web.xml配置文件写错,请仔细检查,或直接更换;②jar冲突或缺失;


实例

报错信息摘录如下:

严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/springMVC1]]
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
	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:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/springMVC1]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	... 6 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;
	at java.lang.Class.getDeclaredFields0(Native Method)
	at java.lang.Class.privateGetDeclaredFields(Class.java:2436)
	at java.lang.Class.getDeclaredFields(Class.java:1806)
	at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
	at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:270)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:139)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
	at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
	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
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.Log
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709)
	... 20 more

六月 12, 2016 7:50:24 下午 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:188)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
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:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	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

六月 12, 2016 7:50:24 下午 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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
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

同样的jar包,放在maven中与放在lib下——是不同的。放在lib下,则不报此错误(为什么?)

版权声明:本文为博主原创文章,未经博主允许不得转载。

解决Tomcat v8.0 Server at localhost failed to start.

SEVERE: A child container failed during start。 java.util.concurrent.ExecutionException: org.apach...

Server Tomcat v7.0 Server at localhost failed to start.错误

spring3.1项目在tomcat7中的启动问题

Javaweb学习笔记——Server Tomcat v9.0 Server at localhost failed to start.

Javaweb学习笔记——Server Tomcat v9.0 Server at localhost failed to start.
  • dlt9527
  • dlt9527
  • 2017年04月21日 17:54
  • 3754

Server Tomcat v8.5 Server at localhost failed to start.

严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catali...

Server Tomcat v7.0 Server at localhost failed to start.

出现这种问题主要会是以下几种原因: 1、端口被占用    这种情况一般都是你的tomcat端口(默认端口8080)被占用了。你可以通过在浏览器中访问 (http://127.0.0.1:80...

错误记录--server tomcat v8.0 server at localhost failed to start

当运行过一个项目后,突然想运行另一个项目重启tomcat时遇到启动tomcat时报错,启动不了。server tomcat v8.0 server at localhost failed to sta...

Server Tomcat v7.0 Server at localhost failed to start 错误解决

严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catal...
  • ymd520
  • ymd520
  • 2016年12月26日 17:10
  • 503

tomcat启动失败 ----Server Tomcat v8.0 Server at localhost failed to start.

首先,事情是这样发生的,之前tomcat运行的还好好的,结果隔了几天再去敲代码的时候,运行tomcat就开始报错了 然后我就觉得tomcat出问题了,默默的就删除了这个tomcat8【版本是8.0....

Tomcat7改为6、Server Tomcat v6.0 Server at localhost failed to start.等错误

花了一上午的时间使用java开发了一个微信聊天机器人(我会将如何编写的过程分享给大家),号码为:qiubenlizi,大家有兴趣可以玩玩。当我将war包上传到SAE服务器的时候,运行出来的结果是这样 ...
  • qqHJQS
  • qqHJQS
  • 2015年06月10日 23:53
  • 4075

Tomcat启动失败-提示Server Tomcat v7.0 Server at localhost failed to start.

最近学习了运行在 Web 服务器(tomcat上)中的小型 Java 程序-->Servlet. Servlet 通常通过 HTTP(超文本传输协议)接收和响应来自 Web 客户端的请求。了解到ser...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Server Tomcat v*.* Server at localhost failed to start.
举报原因:
原因补充:

(最多只允许输入30个字)