在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文件沒正常被加載的
右鍵斷點的小圓點熊杨,彈出斷點設(shè)置窗口愤炸,選擇Breakpoint properties
彈出一個斷點屬性設(shè)置窗口杀糯,并輸入以下字符串
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
System.out.println("===="+this.getName());false;
輸出文件名
相關(guān)資源:tomcat啟動報錯:java.util.zip.ZipException的解決方法
————————————————
版權(quán)聲明:本文為CSDN博主「conkeyn」的原創(chuàng)文章勾栗,遵循CC 4.0 BY-SA版權(quán)協(xié)議,轉(zhuǎn)載請附上原文出處鏈接及本聲明贷洲。
原文鏈接:https://blog.csdn.net/conkeyn/article/details/84924758