vscode-java
vscode-java copied to clipboard
Compile issue:Archive for required library: '../aspectjweaver-1.8.13.jar' in project 'xxxx' cannot be read or is not a valid ZIP file
plugin version: 1.39.0 jdk version: 21 Mvn version: Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Detail messages in output:
[Error - 1:45:33 PM] Feb 19, 2025, 1:45:33 PM Invalid ZIP archive:
.m2/repository/org/aspectj/aspectjweaver/1.8.13/aspectjweaver-1.8.13.jar
Invalid CEN header (invalid zip64 extra data field size)
java.util.zip.ZipException: Invalid CEN header (invalid zip64 extra data field size)
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1848)
at java.base/java.util.zip.ZipFile$Source.checkZip64ExtraFieldValues(ZipFile.java:1377)
at java.base/java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1337)
at java.base/java.util.zip.ZipFile$Source.checkAndAddEntry(ZipFile.java:1255)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1787)
at java.base/java.util.zip.ZipFile$Source.
@XuPengfei-1020 Could you attach your project or pom.xml/build.gradle?
@snjeza The jar was referenced by: +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.3.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.0.3.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot:jar:2.0.3.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.3.RELEASE:compile [INFO] | | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile [INFO] | | | | - ch.qos.logback:logback-core:jar:1.2.3:compile [INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile [INFO] | | | | - org.apache.logging.log4j:log4j-api:jar:2.10.0:compile [INFO] | | | - org.slf4j:jul-to-slf4j:jar:1.7.25:compile [INFO] | | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile [INFO] | | - org.yaml:snakeyaml:jar:1.19:runtime [INFO] | +- org.springframework:spring-aop:jar:5.0.7.RELEASE:compile [INFO] | | - org.springframework:spring-beans:jar:5.0.7.RELEASE:compile [INFO] | - org.aspectj:aspectjweaver:jar:1.8.13:compile
What's more, this issue is appeared recent weeks, with my project no any changing. I have tried to revert vscode plugin to history version and delete m2 repository, but the issue still here.
@XuPengfei-1020 I can't reproduce the issue. Your pom.xml can cause it. Could you show it?
Might be related to these issues:
- https://github.com/eclipse-m2e/m2e-core/issues/1823
- https://bugs.java.com/bugdatabase/view_bug?bug_id=8315828
What works for me is setting the java.jdt.ls.java.home setting to a different JDK version. What works for me is Java 21.0.5-amzn.