Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.util.zip.ZipException: Invalid CEN header (invalid zip64 extra data field size) #1823

Open
testforstephen opened this issue Sep 4, 2024 · 2 comments

Comments

@testforstephen
Copy link
Contributor

Opening the sample project https://github.com/wycm/zhihu-crawler.git in VS Code by Red Hat Java language support extension, the Eclipse JDT language server can import the project well if I use the JDK 17 to run the language server. But when I choose to use JDK 23 to run the language server, it failed to import the same project. The m2e failed to resolve a jar dependency org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar. Here is the exception log.

!ENTRY org.eclipse.m2e.apt.core 4 0 2024-09-04 13:51:44.745
!MESSAGE Error while reading artifact JARs.
!STACK 0
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.<init>(ZipFile.java:1562)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1525)
	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:744)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:254)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:181)
	at java.base/java.util.jar.JarFile.<init>(JarFile.java:345)
	at java.base/java.util.jar.JarFile.<init>(JarFile.java:316)
	at java.base/java.util.jar.JarFile.<init>(JarFile.java:282)
	at org.eclipse.m2e.apt.internal.utils.AnnotationServiceLocator.getAptServiceEntries(AnnotationServiceLocator.java:90)
	at org.eclipse.m2e.apt.internal.utils.ProjectUtils.containsAptProcessors(ProjectUtils.java:264)
	at org.eclipse.m2e.apt.internal.AbstractAptConfiguratorDelegate.configureProject(AbstractAptConfiguratorDelegate.java:141)
	at org.eclipse.m2e.apt.internal.AbstractAptProjectConfigurator.lambda$0(AbstractAptProjectConfigurator.java:95)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:458)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:339)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:278)
	at org.eclipse.m2e.apt.internal.AbstractAptProjectConfigurator.configure(AbstractAptProjectConfigurator.java:88)
	at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:123)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$6(ProjectConfigurationManager.java:503)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:458)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:339)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:497)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.configureNewMavenProjects(ProjectConfigurationManager.java:278)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$1(ProjectConfigurationManager.java:165)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:458)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:339)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:278)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:138)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:129)
	at org.eclipse.jdt.ls.core.internal.managers.MavenProjectImporter.importToWorkspace(MavenProjectImporter.java:242)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:164)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:126)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:277)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
@evuvo-ke
Copy link

did you find a solution. I try updating to the new 1.99.2.1 but it doesn't pass this..
there's also no jar file in the folder.

@mickaelistria
Copy link
Contributor

It could be related to JDK change https://bugs.java.com/bugdatabase/view_bug?bug_id=8315828 . Please make sure this file is valid according to this check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants