java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]

本文为博主原创,未经允许不得转载:

  被坑了好长时间的bug,差点就要重新配置环境,重新下载,重新开始的境遇。在此记录一下:

首先展示一下报错的异常:

-Apr- ::18.218 SEVERE [Catalina-startStop-] 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[/rss]]
at java.util.concurrent.FutureTask.report(FutureTask.java:)
at java.util.concurrent.FutureTask.get(FutureTask.java:)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:)
at java.util.concurrent.FutureTask.run(FutureTask.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rss]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
... more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@b7e69b0]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
... more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@7c89e70]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
... more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:)
... more
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$(ZipFile.java:)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:)
at sun.misc.IOUtils.readFully(IOUtils.java:)
at java.util.jar.JarFile.getBytes(JarFile.java:)
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:)
at java.util.jar.JarFile.getManifest(JarFile.java:)
at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:)
... more -Apr- ::18.268 SEVERE [main] 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:)
at java.util.concurrent.FutureTask.get(FutureTask.java:)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.startup.Catalina.start(Catalina.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:)
at java.util.concurrent.FutureTask.run(FutureTask.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
... more -Apr- ::18.310 SEVERE [main] 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[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.startup.Catalina.start(Catalina.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
... more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
... more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:)
... more -Apr- ::18.329 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
-Apr- ::18.330 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8443"]
-Apr- ::18.332 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
-Apr- ::18.334 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
-Apr- ::18.337 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
-Apr- ::18.339 SEVERE [main] org.apache.coyote.AbstractProtocol.destroy Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:)
at org.apache.catalina.startup.Catalina.start(Catalina.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:) -Apr- ::18.354 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8443"]
-Apr- ::18.355 SEVERE [main] org.apache.coyote.AbstractProtocol.destroy Failed to destroy end point associated with ProtocolHandler ["http-nio-8443"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:)
at org.apache.catalina.startup.Catalina.start(Catalina.java:)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:)
at java.lang.reflect.Method.invoke(Method.java:)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:)

刚开始遇到的解决方法是,在定位 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException这个报错的异常,一直没有找到

相应的解决方案。

后来在定位Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)这个异常,这个异常提示

依赖的jar有问题,做的步骤是删除jar包,重新下载,然而并没有得到解决。迫不得已我把maven仓库的所有jar包都删了,进行重新下载,然而也没有下好。

  很奔溃,问了几个同事说是环境有问题,我觉得应该不是,因为这个环境一直都在用,而且用了很长时间。

后来就在定位是那几个jar包出问题了,然而没有定位到。不得己之际,我将同事本地的maven仓库的jar拷了过来,然后refresh项目,就可以运行了。

上一篇:JS实现添加至购物车功能


下一篇:vsftpd配置参数详细整理