Maven專案報錯invalid LOC header (bad signature)
報錯資訊如下:
嚴重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SpringMvcController]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused 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)
... 12 more
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
說明jar包出現了問題。
- 解決方法1:
- 右擊專案名 —> Run as —> Maven test ,這時控制檯會報哪個jar包出錯
- 或者專案目錄下命令列執行:
mvn test
和Eclipse控制檯輸出資訊一致
- 解決方法2:
如果方法1未出現任何錯誤資訊,那麼開啟專案中的pom.xml檔案,在自己的Maven本地倉庫去查詢pom.xml檔案中每一個dependency節點所對應的jar包版本。一個一個對比,看看是否都正常下載。 找到了本地倉庫中出現的jar包錯誤:
解決方法:
既然jar包未下載成功,那麼重新下載就行了。如果重新下載還是不能成功,那就在網上下載同版本的拷貝進去。
刪除掉該jar包所在目錄下的所有檔案後,重新執行maven install。
這時,可看到jar包已正常下載。
再次執行專案,右擊專案 —> Run as —> Run on server 。專案能正常執行了。
相關文章
- 【maven】Maven報錯 zip END header not foundMavenHeader
- Maven專案報錯:No bean named 'xxxxxx' availableMavenBeanAI
- StreamCorruptedException: invalid stream headerExceptionHeader
- 建立Maven專案出錯Maven
- 建立Maven專案出錯 pom出錯Maven
- nukkit maven 專案除錯外掛Maven除錯
- Maven建立專案遇到導包錯誤:Maven
- invalid stream header: EFBFBDEF 問題解決Header
- PHP 介面呼叫報錯 502 Bad GatewayPHPGateway
- React報錯之Element type is invalidReact
- idea匯入專案報Maven version is not definedIdeaMaven
- 設定Ruby報錯bad response Not Found 404
- eclipse中maven專案failonmissingwebxml錯誤的修復EclipseMavenAIWebXML
- 使用yum報錯Your license is invalid.
- Maven建立SSM專案 啟動時報錯Mapped Statements collection does not contain value for xxxMavenSSMAPPAI
- 專案編譯報錯編譯
- react建立專案報錯React
- python: invalid value encountered in divide以及invalid value encountered in double_scalars報錯PythonIDE
- Maven 專案文件Maven
- Maven 專案模板Maven
- 部署Maven專案到tomcat報錯:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi...MavenTomcatJavaExceptionSpringFrameworkWebContext
- Django報錯ValueError: invalid literal for int() with base 10:DjangoError
- Maven教程(Eclipse配置及maven專案)MavenEclipse
- 執行web專案報錯Web
- git clone 報錯 “URL using bad/illegal format or missing URL“GitORM
- `jsonb` 報錯 `invalid input syntax for type timestamp with time zone ““JSON
- 如何解決偶然Maven專案中匯入依賴,卻一直報錯,unresolved dependencyMaven
- Elasticsearch 6 建立索引報錯 invalid_index_name_exception Invalid index name [testDemo], must be lowercaseElasticsearch索引IndexException
- maven 專案轉化成 gradle 專案實踐MavenGradle
- 在opendaylight專案開發時,執行maven命令生成專案骨架時,出現錯誤。Maven
- Maven專案打jar包MavenJAR
- Maven 構建 Java 專案MavenJava
- Java Maven專案推送到 Maven 中央倉庫JavaMaven
- IDEA專案已新增jar包,pom檔案,打包Maven卻一直報錯的幾種解決方法IdeaJARMaven
- MybatisPlus自帶方法報錯BindingException: Invalid bound statement (not found)MyBatisException
- kafka報錯:InvalidReceiveException: Invalid receive (size = 1195725856 larger than 104857600)KafkaException
- Mingw GCC 編譯OpenCV報錯: Project files may be invalidGC編譯OpenCVProject
- 解決idea匯入maven專案報Unable to import maven project: See logs for details問題IdeaMavenImportProjectAI