1. 程式人生 > >Java Web專案Tomcat啟動報錯:java.util.zip.ZipException: invalid LOC header

Java Web專案Tomcat啟動報錯:java.util.zip.ZipException: invalid LOC header

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:56)    
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:679)    
    at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill
(ZipFile.java:415) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read(BufferedInputStream.java:254)

    這是因為有jar包沒有下載完全引起的,需要將相應包重新下載。到maven的reposity目錄下搜aether*****in-progress(可以搜aether或者in-progress都行)檔案,如果存在,把這個檔案對應的版本目錄刪除,重新整理一下專案重新部署打包即可。