ContainerBase.addChild: start: 问题出现的原因和解决方法

版权声明:本文为博主原创文章,转载请注明出处! https://blog.csdn.net/q1406689423/article/details/79969159

今天看到以下异常,昨天还好好的,今天怎么就不行了呢,有点纳闷,仔细查看了提示,找到了问题出现的原因。

严重: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Product]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	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:744)
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> myAcount in servlet mapping
	at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3279)
	at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3254)
	at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1361)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1341)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:873)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:371)
	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:5355)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 10 more
四月 17, 2018 7:55:43 上午 org.apache.catalina.startup.HostConfig deployDirectory
严重: Error deploying web application directory H:\apache-tomcat-7.0.52-windows-x64\apache-tomcat-7.0.52\webapps\Product
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Product]]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	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:744)

可以看到的是

Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> myAcount in servlet mapping
	at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3279)
	at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3254)
	at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1361)

myAccout是我新建的一个Servelet的mapping,然后就以下什么都明白了。就是写mapping的时候忘记了在前面添加"/"号。。呃。。。这错误有点低级
希望能给大家解决问题提供些帮助吧,别被这些小错误给困扰到!嘻嘻

ContainerBase.addChild: start: org.apache.catalina.LifecycleException

08-20

在MyEclipse10 中新建了一个web project rnrn报错如下:rnrn严重: ContainerBase.addChild: start: rnorg.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Login]]rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: java.lang.NoClassDefFoundError: Lorg/apache/logging/log4j/Logger;rn at java.lang.Class.getDeclaredFields0(Native Method)rn at java.lang.Class.privateGetDeclaredFields(Class.java:2499)rn at java.lang.Class.getDeclaredFields(Class.java:1811)rn at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)rn at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:261)rn at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:110)rn at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:66)rn at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405)rn at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)rn at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn ... 10 morernCaused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.Loggerrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)rn ... 24 morern八月 20, 2017 10:53:51 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn严重: Error deploying web application directory H:\Tomcat\webapps\Loginrnjava.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Login]]rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnrnrnrnrnweb.xml内容如下:rnrn[size=14px]rnrnrn rn rn rn rn /login.jsprn /login.jsprn rn rnrnrn是哪里出错了?rnrn

项目启动报错严重: ContainerBase.addChild: start:

11-14

使用工具 myeclipse 2017 , jdk 1.9 tomcat 8.5 的rnrn自己搭建了一个ssm项目 配置完之后启动项目报下面错误rnrn严重: ContainerBase.addChild: start: rnorg.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test]]rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@3c53c7f1]rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)rn at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4842)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4974)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn ... 10 morernCaused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@2829ac96]rn at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)rn at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:708)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn ... 13 morernCaused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)rn at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:113)rn at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)rn ... 16 morernCaused by: java.util.zip.ZipException: invalid LOC header (bad signature)rn at java.util.zip.ZipFile.read(Native Method)rn at java.util.zip.ZipFile.access$1400(ZipFile.java:60)rn at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)rn at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)rn at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)rn at sun.misc.IOUtils.readFully(IOUtils.java:65)rn at java.util.jar.JarFile.getBytes(JarFile.java:425)rn at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)rn at java.util.jar.JarFile.getManifest(JarFile.java:180)rn at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:111)rn ... 17 morernrn十一月 14, 2017 2:00:56 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn严重: Error deploying web application directory E:\myeclipse\Workspaces\MyEclipse 2017 CI\.metadata\.me_tcat85\webapps\testrnjava.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test]]rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:756)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:745)rn十一月 14, 2017 2:00:56 下午 org.apache.catalina.startup.HostConfig deployDirectoryrnrn[color=#FF6600]web.xml配置:[/color]rnrnrn testrn rn index.htmlrn index.htmrn index.jsprn default.htmlrn default.htmrn default.jsprn /index.jsprn rn rn rn contextConfigLocationrn classpath:spring.xmlrn rn rn org.springframework.web.context.ContextLoaderListenerrn rnrn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrnrn truern rn encodingrnrn UTF-8rn rn rn rn encodingFilterrn /*rn rnrn rn SpringMVCrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn classpath:springmvc.xmlrn rn rn rn SpringMVCrn *.actionrn rnrn[color=#FF6600]spring.xmlrn[/color]rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnspringmvc.xmlrnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrn求解!!!!

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭