tomcat启动报错failed to start component

严重: A child container failed during start 
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test]] 
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) 
at java.util.concurrent.FutureTask.get(FutureTask.java:83) 
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1128) 
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:782) 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) 
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
at java.lang.Thread.run(Thread.java:619) 
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test]] 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 
... 7 more 
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig; 
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1309) 
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1357) 
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855) 
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345) 
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) 
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161) 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
... 7 more 
2012-3-26 14:50:17 org.apache.catalina.core.ContainerBase startInternal

解决过程:

曾经替换过tomcat中的servlet-api.jar包,导致出错。servlet版本和开发时用的版本不一致。

原因:

tomcat为其配套的servlet-api.jar不匹配或项目工程lib下有低版本的servlet-api.jar, 
tomcat7以前的这个包没有getSessionCookieConfig这个方法,7的包有这个方法, 
解决方法,删除项目工程lib文件夹的低版本的servlet-api.jar,tomcat的lib文件夹里用默认带的jar包
或者把tomcat换成6的

时间: 2024-10-03 23:01:14

tomcat启动报错failed to start component的相关文章

Tomcat启动报错 Failed to start component [StandardServer[8005]]解决

SEVERE: The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]] 之前在Eclipse上部署了Tomcat服务器,今天在MyEclipse上部署,结果Tomcat启动失败,报错.在网上搜了半天,有的说是因为端口被占用,有

tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost].

tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost].多半情况是找不到jar包 解决办法: 右键项目-> 属性->添加lib 原文地址:https://www.cnblogs.com/firstdream/p/8401626.html

Tomcat启动报错[org.apache.struts2.dispatcher.Dispatcher]Dispatcher initialization failed

Tomcat启动报错: [org.apache.struts2.dispatcher.Dispatcher]Dispatcher initialization failed Unable to load configuration. - bean - jar:file:/E:/SoftwareDevelopment/Software/Eclipse4.3/eclipse-jee-kepler-SR1-win32-x86_64/Workspace/.metadata/.plugins/org.ec

Tomcat启动报错java.net.AbstractPlainSocketImpl(java/net/AbstractPlainSocketImpl.java:178:-1)Struts在网络复杂情况下启动报错解决办法

SSH项目 在网络复杂的情况(具体规律未知)下,Tomcat启动时,报如下错误: [ERROR] 2014-08-12 14:52:58,484 [org.apache.struts2.dispatcher.Dispatcher :27] - Dispatcher initialization failedUnable to load configuration. - Class: java.net.AbstractPlainSocketImplFile: AbstractPlainSocket

tomcat启动报错,找不到相应的 queue,从而引发内存泄漏

tomcat启动报错,无法创建 bean listenerStatusChangeDealHandler, no queue 'STOCK.NOTIFY_CHANGE.INTER.CACHE.QUEUE' in vhost 从启动日志来看,有时候仅会看到内存泄漏,而没有与queue相关的日志,非常easy走错方向. 依照 http://blog.csdn.net/wangjunjun2008/article/details/23375501 的方法能够看到具体日志,从而确定报错原因 tomcat

tomcat启动报错,找不到对应的 queue,从而引发内存泄漏

tomcat启动报错,无法创建 bean listenerStatusChangeDealHandler, no queue 'STOCK.NOTIFY_CHANGE.INTER.CACHE.QUEUE' in vhost 从启动日志来看,有时候仅会看到内存泄漏,而没有与queue相关的日志,很容易走错方向. 按照 http://blog.csdn.net/wangjunjun2008/article/details/23375501 的方法可以看到详细日志,从而确定报错原因 tomcat启动报

Eclipse启动 报错[Failed to load the JNI shared library jvm.dll

准备要做java服务器,在安装开发环境时,启动Eclipse报错[Failed to load the JNI shared library jvm.dll] 研究了下,造成错误的原因是由于eclipse与jdk的不一致造成的. 我的开发环境是64位windows8 Pro,安装了64位jdk1.6,eclipse却粗物的安装了32位的版本,由于64位和32位匹配不一致,造成了以上错误的发生. 又尝试了一下,32位jdk+64位eclipse也会发生同样的问题. 好了,解决方法很简单,jdk和e

Tomcat启动报错:严重: StandardServer.await: create[8005] java.net.BindException: Cannot assign requested address

org.apache.catalina.core.StandardServer await        SEVERE: StandardServer.await: create[8005]:        java.net.BindException: Cannot assign requested address java.net.BindException: Cannot assign requested address        at java.net.PlainSocketImpl

Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架

SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.org.springframework.web.context.ContextLoaderListener在web.xml配置文件中已经配置 2.查看工程是否添加此jar包,org.springframework.web.context.ContextLoaderListener的jar包为spring