0


已解决java.util.concurrent.ExecutionException异常的正确解决方法,亲测有效!!!

已解决java.util.concurrent.ExecutionException异常的正确解决方法,亲测有效!!!

在这里插入图片描述

文章目录

报错问题

粉丝群里面的一个小伙伴敲代码时发生了报错(当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记录一下希望可以帮助到更多遇到这个bug不会解决的小伙伴),报错信息如下:

在这里插入图片描述

java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException:Failedtostart component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/recommender]]
    at java.util.concurrent.FutureTask.report(UnknownSource)
    at java.util.concurrent.FutureTask.get(UnknownSource)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(UnknownSource)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)
    at java.lang.Thread.run(UnknownSource)Caused by:org.apache.catalina.LifecycleException:Failedtostart component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/recommender]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)...6 more
Caused by:org.apache.catalina.LifecycleException:Failedtostart component [org.apache.catalina.webresources.StandardRoot@5a3ef48a]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4968)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5101)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)...6 more
Caused by:org.apache.catalina.LifecycleException:Failedtoinitialize component [org.apache.catalina.webresources.JarResourceSet@725c6763]
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:135)
    at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:722)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)...9 more
Caused by:java.lang.IllegalArgumentException:java.util.zip.ZipException: invalid LOC header (bad signature)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:142)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)...12 more
Caused by:java.util.zip.ZipException: invalid LOC header (bad signature)
    at java.util.zip.ZipFile.read(NativeMethod)
    at java.util.zip.ZipFile.access$1400(UnknownSource)
    at java.util.zip.ZipFile$ZipFileInputStream.read(UnknownSource)
    at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(UnknownSource)
    at java.util.zip.InflaterInputStream.read(UnknownSource)
    at sun.misc.IOUtils.readFully(UnknownSource)
    at java.util.jar.JarFile.getBytes(UnknownSource)
    at java.util.jar.JarFile.getManifestFromReference(UnknownSource)
    at java.util.jar.JarFile.getManifest(UnknownSource)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:140)...13 more
 
一月 22,20184:27:58 下午 org.apache.catalina.core.ContainerBase startInternal
严重:A child container failed during start
java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException:Failedtostart component [StandardEngine[Catalina].StandardHost[localhost]]
    at java.util.concurrent.FutureTask.report(UnknownSource)
    at java.util.concurrent.FutureTask.get(UnknownSource)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:630)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    at sun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)
    at java.lang.reflect.Method.invoke(UnknownSource)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)Caused by:org.apache.catalina.LifecycleException:Failedtostart component [StandardEngine[Catalina].StandardHost[localhost]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(UnknownSource)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)
    at java.lang.Thread.run(UnknownSource)Caused by:org.apache.catalina.LifecycleException:A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:951)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)...6 more
 
一月 22,20184:27:58 下午 org.apache.catalina.startup.Catalina start
严重:The required Server component failed tostart so Tomcat is unable tostart.org.apache.catalina.LifecycleException:Failedtostart component [StandardServer[8005]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:630)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
    at sun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)
    at java.lang.reflect.Method.invoke(UnknownSource)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:349)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:483)Caused by:org.apache.catalina.LifecycleException:Failedtostart component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:789)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)...7 more
Caused by:org.apache.catalina.LifecycleException:Failedtostart component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)...9 more
Caused by:org.apache.catalina.LifecycleException:A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:951)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)...11 more

解决方法

解决方法如下

在这里插入图片描述
找到 tomcat下的 server.xml,打开后删除以下的东东。

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"><Valve className="org.apache.catalina.authenticator.SingleSignOn"/><Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." suffix=".txt"/><Context docBase="MyProject" path="/MyProject" reloadable="true" source="org.eclipse.jst.jee.server:MyProject"/></Host>

福利

每周会送6本技术书籍包邮到家
由于博主时间精力有限,每天私信人数太多,没办法每个粉丝都及时回复
大家可以进社区裙或者添加博主微信
点击下方链接即可
http://t.csdn.cn/6kInJ

标签: java apache maven

本文转载自: https://blog.csdn.net/weixin_50843918/article/details/129702483
版权归原作者 桃花键神 所有, 如有侵权,请联系我们删除。

“已解决java.util.concurrent.ExecutionException异常的正确解决方法,亲测有效!!!”的评论:

还没有评论