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

CI build throws "java.util.zip.ZipException: zip END header not found" #4167

Closed
andrewfg opened this issue Apr 3, 2024 · 7 comments · Fixed by #4168
Closed

CI build throws "java.util.zip.ZipException: zip END header not found" #4167

andrewfg opened this issue Apr 3, 2024 · 7 comments · Fixed by #4168
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@andrewfg
Copy link
Contributor

andrewfg commented Apr 3, 2024

On the current OH snapshot the CI build throws "java.util.zip.ZipException: zip END header not found" as shown in the log below. The build nevertheless succeeds, but I wonder if there is some underlying error?

Failed to init Classpath for jar file C:\Users\AndrewFG\.m2\repository\org\apache\karaf\features\standard\4.4.5\standard-4.4.5-features.xml
java.util.zip.ZipException: zip END header not found
        at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1634)
        at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1642)
        at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1480)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1442)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:718)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:252)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:181)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:195)
        at org.eclipse.jdt.internal.compiler.batch.ClasspathJar.initialize(ClasspathJar.java:204)
        at org.eclipse.jdt.internal.compiler.batch.ClasspathMultiReleaseJar.initialize(ClasspathMultiReleaseJar.java:38)
        at org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>(FileSystem.java:233)
        at org.eclipse.jdt.internal.compiler.batch.Main.getLibraryAccess(Main.java:3480)
        at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4726)
        at org.eclipse.jdt.internal.compiler.tool.EclipseCompilerImpl.call(EclipseCompilerImpl.java:101)
        at org.eclipse.jdt.internal.compiler.tool.EclipseCompiler$1.call(EclipseCompiler.java:196)
        at org.codehaus.plexus.compiler.eclipse.EclipseJavaCompiler.performCompile(EclipseJavaCompiler.java:351)
        at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1140)
        at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:193)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
        at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
        at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
        at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
        at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
        at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:206)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348)
@andrewfg andrewfg added the bug An unexpected problem or unintended behavior of the Core label Apr 3, 2024
@jlaur
Copy link
Contributor

jlaur commented Apr 3, 2024

@wborn, @holgerfriedrich - I think you might have some knowledge in this area?

@holgerfriedrich
Copy link
Member

The error seems to show up since ecj was upgraded (versions >3.30.0).
I could not figure out the root cause yet.
Initially I thought it would be on JDK21 only, but as we see, JDK17 is affected.

@jlaur
Copy link
Contributor

jlaur commented Apr 3, 2024

The error seems to show up since ecj was upgraded (versions >3.30.0).

Thanks! So regression of #4154. @openhab/core-maintainers - can someone with access move this issue to the core repository?

@J-N-K J-N-K transferred this issue from openhab/openhab-addons Apr 3, 2024
@J-N-K
Copy link
Member

J-N-K commented Apr 3, 2024

I habe also seen these exceptions in the past, that's why I didn't upgrade any further in #2994: See #2994 (comment)

@jlaur
Copy link
Contributor

jlaur commented Apr 3, 2024

Perhaps related: eclipse-jdt/eclipse.jdt.core#1578

@holgerfriedrich
Copy link
Member

We cannot roll this back w/o breaking j21 build.... Will have a look later.

@holgerfriedrich
Copy link
Member

Ok, I opened a few PRs, lets see if it works...

florian-h05 pushed a commit to openhab/openhab-webui that referenced this issue Apr 12, 2024
Avoid ZipException with ejc >3.30.0.

Refs: openhab/openhab-core#4167

Signed-off-by: Holger Friedrich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants