欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误  

程序员文章站 2022-07-07 16:49:44
...

在tomcat启动时报invalid LOC header (bad signature)错误

 

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(Native Method)
	at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
	at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
	at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:434)
	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.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:140)
	... 13 more

 以下截图是用于定位哪个jar文件没正常被加载的

 

定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
            
    
    
         

右键断点的小圆点,弹出断点设置窗口,选择Breakpoint properties

定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
            
    
    
         

弹出一个断点属性设置窗口,并输入以下字符串

定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
            
    
    
         

 

System.out.println("===="+this.getName());false;

 输出文件名

定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
            
    
    
         

 

  • 定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
            
    
    
         
  • 大小: 105.3 KB
  • 定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
            
    
    
         
  • 大小: 108.7 KB
  • 定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
            
    
    
         
  • 大小: 33.7 KB
  • 定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
            
    
    
         
  • 大小: 63.3 KB