tomcat的war由于损坏不能解压导致的服务不能启动

问题描述:

  Tomcat启动,提示异常,服务自动释放!

INFO: Starting Servlet Engine: Apache Tomcat/7.0.81
Sep 30, 2018 7:11:56 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/yhs-web]]
    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:1233)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1694)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1684)
    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[/yhs-web]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: MALFORMED //畸形的war at java.util.zip.ZipCoder.toString(ZipCoder.java:58)
    at java.util.zip.ZipFile.getZipEntry(ZipFile.java:531) //xxx.war ==> xxx.zip 
    at java.util.zip.ZipFile.access$900(ZipFile.java:56)
    at java.util.zip.ZipFile$1.nextElement(ZipFile.java:513)
    at java.util.zip.ZipFile$1.nextElement(ZipFile.java:483)
    at java.util.jar.JarFile$1.nextElement(JarFile.java:244)
    at java.util.jar.JarFile$1.nextElement(JarFile.java:239)
    at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:114)
    at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:737)
    at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:862)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:390)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:388)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:144)
    ... 6 more

问题解决:

  01、人工解压到制定的目录webapps/yhs-web/

  02、或者重新打包,部署!

    原文作者:mvpbang
    原文地址: https://www.cnblogs.com/xiaochina/p/9739220.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞