Tomcat Startup error report: the solution of java.util.zip.ZipException
Find a problem
When I got up in the morning, I reported an error, and Jenkins was packaged to the tomcat server, but it didn't start, and some scheduled tasks didn't run successfully.
The error is as follows:
Org.apache.catalina.startup.ContextConfig.beforeStart Exception fixing docBase for context [/ test] java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open (Native Method) at java.util.zip.ZipFile. (ZipFile.java:219) at java.util.zip.ZipFile. (ZipFile.java:149) at java.util.jar.JarFile. (JarFile.java:166) at java.util.jar.JarFile. (JarFile.java:103) at sun.net.www.protocol. Jar.URLJarFile. (URLJarFile.java:93) at sun.net.www.protocol.jar.URLJarFile.getJarFile (URLJarFile.java:69) at sun.net.www.protocol.jar.JarFileFactory.get (JarFileFactory.java:99) at sun.net.www.protocol.jar.JarURLConnection.connect (JarURLConnection.java:122) at sun.net.www.protocol.jar.JarURLConnection.getJarFile (JarURLConnection.java:89) at org.apache.catalina.startup.ExpandWar.expand (ExpandWar.java:130) at org.apache.catalina .startup.ContextConfig.fixDocBase (ContextConfig.java:618) at org.apache.catalina.startup.ContextConfig.beforeStart (ContextConfig.java:744) at org.apache.catalina.startup.ContextConfig.lifecycleEvent (ContextConfig.java:307) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java:95) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent (LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal (LifecycleBase.java:402) at org.apache.catalina.util.LifecycleBase.start (LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild (StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployWAR (HostConfig.java:945) at org.apache.catalina.startup.HostConfig$DeployWar.run (HostConfig.java:1795) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at Java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617) at java.lang.Thread.run (Thread.java:745) 04-Jan-2018 09Gan23 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine.Catalina] .StandardHost [localhost] .StandardContext [/ test]] at org.apache.catalina.util.LifecycleBase.start (LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild (StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployWAR (HostConfig.java:945) at org.apache.catalina.startup.HostConfig$DeployWar.run HostConfig.java:1795) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617) at java.lang.Thread.run (Thread.java:745) Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@778c717c] at org. Apache.catalina.util.LifecycleBase.start (LifecycleBase.java:154) at org.apache.catalina.core.StandardContext.resourcesStart (StandardContext.java:4928) at org.apache.catalina.core.StandardContext.startInternal (StandardContext.java:5058) at org.apache.catalina.util.LifecycleBase.start (LifecycleBase.java:150)... 10 moreCaused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@5067d644] at org.apache.catalina.util.LifecycleBase.init (LifecycleBase .java: 106) at org.apache.catalina.util.LifecycleBase.start (LifecycleBase.java:139) at org.apache.catalina.webresources.StandardRoot.startInternal (StandardRoot.java:690) at org.apache.catalina.util.LifecycleBase.start (LifecycleBase.java:150)... 13 moreCaused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: error in opening zip file at org.apache.catalina.webresources.JarResourceSet.initInternal (JarResourceSet.java:96) at org.apache.catalina.util.LifecycleBase.init (LifecycleBase.java:102)... 16 moreCaused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open (Native Method) at java.util.zip.ZipFile. (ZipFile.java:219) at java.util.zip.ZipFile. (ZipFile.java:149) at java.util.jar.JarFile. (JarFile.java:166) at java.util.jar.JarFile. (JarFile.java:103) at org.apache.catalina.webresources.JarResourceSet.initInternal (JarResourceSet.java:88). 17 more
Solution method
Entangled for a long time, found that the tomcat/webapps/test.war package, did not decompress, searched for a while, all kinds of problems encountered seem to be different, think that there is a problem with the war package, they manually sent one into, also did not solve, at the same time did not decompress. I took a look at the disk space.
[] # df-hFilesystem Size Used Avail Use% Mounted on/dev/mapper/VolGroup-lv_root 45G 45G 0% / tmpfs 16G 72K 16G 1% / dev/shm/dev/sda1 485M 40M 421M 9% / boot
Found that the disk space is full, delete some log files, clean up some junk history files, free up some disk space, well, solved, can be deployed, boot also did not report an error.
Summary
The above is the whole content of this article, I hope that the content of this article has a certain reference and learning value for your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.