Tomcat _ startup error: Caused by: java.util.zip. ZipException: invalid LOC header (bad signature) at java. uti solution,

Source: Internet
Author: User

Tomcat _ startup error: Caused by: java.util.zip. ZipException: invalid LOC header (bad signature) at java. uti solution,

1.The error java.util.zip. ZipException: invalid LOC header is returned.

Today, I tried a new JavaWEB project in IDEA. After the environment is configured, it cannot be started. This problem has plagued me for four hours and finally solved the problem. The record is as follows:

Error message:

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 $1400 (ZipFile. java: 61)
At java.util.zip. ZipFile $ ZipFileInputStream. read (ZipFile. java: 717)
At java.util.zip. ZipFile $ ZipFileInflaterInputStream. fill (ZipFile. java: 420)
At java.util.zip. InflaterInputStream. read (InflaterInputStream. java: 158)
At sun. misc. IOUtils. readFully (IOUtils. java: 65)
At java. util. jar. JarFile. getBytes (JarFile. java: 425)
At java. util. jar. JarFile. getManifestFromReference (JarFile. java: 193)
At java. util. jar. JarFile. getManifest (JarFile. java: 180)
At org. apache. catalina. webresources. JarResourceSet. initInternal (JarResourceSet. java: 94)
... 50 more

Complete Error Log:

 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]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.manageApp(HostConfig.java:1648)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:463)at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)at sun.rmi.transport.Transport$1.run(Transport.java:200)at sun.rmi.transport.Transport$1.run(Transport.java:197)at java.security.AccessController.doPrivileged(Native Method)at sun.rmi.transport.Transport.serviceCall(Transport.java:196)at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/1102092151.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)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@6b5e95bc]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4845)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4975)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)... 43 moreCaused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@7b0f683b]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:699)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)... 46 moreCaused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:96)at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)... 49 moreCaused by: java.util.zip.ZipException: invalid LOC header (bad signature)at java.util.zip.ZipFile.read(Native Method)at java.util.zip.ZipFile.access$1400(ZipFile.java:61)at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:420)at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)at sun.misc.IOUtils.readFully(IOUtils.java:65)at java.util.jar.JarFile.getBytes(JarFile.java:425)at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)at java.util.jar.JarFile.getManifest(JarFile.java:180)at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:94)... 50 more27-Mar-2018 17:10:59.833 SEVERE [RMI TCP Connection(5)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method manageApp java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)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.manageApp(HostConfig.java:1648)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:463)at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)at sun.rmi.transport.Transport$1.run(Transport.java:200)at sun.rmi.transport.Transport$1.run(Transport.java:197)at java.security.AccessController.doPrivileged(Native Method)at sun.rmi.transport.Transport.serviceCall(Transport.java:196)at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/1102092151.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)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)27-Mar-2018 17:10:59.833 SEVERE [RMI TCP Connection(5)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method createStandardContext javax.management.RuntimeOperationsException: Exception invoking method manageAppat org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:308)at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:463)at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)at sun.rmi.transport.Transport$1.run(Transport.java:200)at sun.rmi.transport.Transport$1.run(Transport.java:197)at java.security.AccessController.doPrivileged(Native Method)at sun.rmi.transport.Transport.serviceCall(Transport.java:196)at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/1102092151.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)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: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)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.manageApp(HostConfig.java:1648)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)... 34 more

Solution:

Clear the local maven repository and re-download the required jars.

No better solution is found for the moment. Because there are many dependencies declared in pom. xml in the project, it cannot be determined that the jar package is not completely downloaded,

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.