java.util.zip.ZipException: invalid LOC header (bad signature)

简介: java.util.zip.ZipException: invalid LOC header (bad signature)

记录下最近遇到的一些记录的东西:

  项目中引用消息中间件,pom文件中添加了依赖,并maven-update,maven-install等,项目启动之后,一直报下面的异常。

Could not index class org/apache/activemq/artemis/api/jms/ActiveMQJMSClient.class at 
    /D:/wildfly820Final_2/standalone/deployments/fucdn-admin.war/WEB-INF/lib/windq-artemis-jms-client-2.4.0-BETA9.jar: 
    java.util.zip.ZipException: invalid LOC header (bad signature)
    at java.util.zip.ZipFile.read(Native Method) [rt.jar:1.8.0_181]
    at java.util.zip.ZipFile.access$1400(Unknown Source) [rt.jar:1.8.0_181]
    at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source) [rt.jar:1.8.0_181]
    at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source) [rt.jar:1.8.0_181]
    at java.util.zip.InflaterInputStream.read(Unknown Source) [rt.jar:1.8.0_181]
    at java.io.BufferedInputStream.fill(Unknown Source) [rt.jar:1.8.0_181]
    at java.io.BufferedInputStream.read1(Unknown Source) [rt.jar:1.8.0_181]
    at java.io.BufferedInputStream.read(Unknown Source) [rt.jar:1.8.0_181]
    at java.io.DataInputStream.readFully(Unknown Source) [rt.jar:1.8.0_181]
    at java.io.DataInputStream.readFully(Unknown Source) [rt.jar:1.8.0_181]
    at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:433) [jandex-1.2.1.Final.jar:1.2.1.Final]
    at org.jboss.jandex.Indexer.index(Indexer.java:689) [jandex-1.2.1.Final.jar:1.2.1.Final]
    at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_181]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_181]

17:37:05,015 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."fucdn-admin.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."fucdn-admin.war".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "fucdn-admin.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_181]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_181]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018741: Failed to get manifest for deployment "/D:/wildfly820Final_2/standalone/deployments/fucdn-admin.war/WEB-INF/lib/windq-artemis-jms-client-2.4.0-BETA9.jar"
    at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.getManifest(ManifestAttachmentProcessor.java:78) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.server.deployment.module.ManifestAttachmentProcessor.deploy(ManifestAttachmentProcessor.java:65) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
    ... 5 more

 这个主要的异常提示是:

java.util.zip.ZipException: invalid LOC header (bad signature)..

这个主要由于引用的maven依赖文件在maven仓库没有下载成功,需要将maven仓库中对应的文件删除之后重新下载。
如果不删除,一直maven-update或maven-install可能不会下载成功,会一直报该异常

 

标签: 异常

目录
相关文章
|
25天前
|
存储 Java Linux
Java“Bad Magic Number”错误解决
Java“Bad Magic Number”错误通常发生在尝试运行不兼容或损坏的类文件时。解决方法包括确保使用正确的JDK版本、检查类文件完整性、清理和重新编译项目。
|
6月前
|
Java 应用服务中间件 Spring
SpringBoot出现 java.lang.IllegalArgumentException: Request header is too large 解决方法
SpringBoot出现 java.lang.IllegalArgumentException: Request header is too large 解决方法
236 0
|
6月前
|
前端开发 Java 应用服务中间件
【异常解决】java程序连接MinIO报错The request signature we calculated does not match the signature you provided.
【异常解决】java程序连接MinIO报错The request signature we calculated does not match the signature you provided.
512 0
|
6月前
|
SQL Java 数据库连接
解决bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
解决bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
136 0
|
6月前
java.lang.IllegalArgumentException: Invalid character found in method name
java.lang.IllegalArgumentException: Invalid character found in method name
184 0
|
6月前
|
SQL Java 数据库连接
解决bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
解决bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
107 0
|
6月前
【已解决】nested exception is java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
【已解决】nested exception is java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
85 0
|
6天前
|
Java 开发者
Java多线程编程中的常见误区与最佳实践####
本文深入剖析了Java多线程编程中开发者常遇到的几个典型误区,如对`start()`与`run()`方法的混淆使用、忽视线程安全问题、错误处理未同步的共享变量等,并针对这些问题提出了具体的解决方案和最佳实践。通过实例代码对比,直观展示了正确与错误的实现方式,旨在帮助读者构建更加健壮、高效的多线程应用程序。 ####
|
5天前
|
安全 Java 开发者
Java 多线程并发控制:深入理解与实战应用
《Java多线程并发控制:深入理解与实战应用》一书详细解析了Java多线程编程的核心概念、并发控制技术及其实战技巧,适合Java开发者深入学习和实践参考。
|
5天前
|
Java 开发者
Java多线程编程的艺术与实践####
本文深入探讨了Java多线程编程的核心概念、应用场景及实践技巧。不同于传统的技术文档,本文以实战为导向,通过生动的实例和详尽的代码解析,引领读者领略多线程编程的魅力,掌握其在提升应用性能、优化资源利用方面的关键作用。无论你是Java初学者还是有一定经验的开发者,本文都将为你打开多线程编程的新视角。 ####