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

Upgrade ASM to support Java 13 #2015

Closed
TapaniRundgren opened this issue Sep 23, 2019 · 4 comments · Fixed by #2017
Milestone

Comments

@TapaniRundgren
Copy link

@TapaniRundgren TapaniRundgren commented Sep 23, 2019

OS: Windows 10 (1903)
Maven: 3.6.2
Java: 13
JIB: 1.6.1
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:1.6.1:dockerBuild (default-cli) on project user: Execution default-cli of goal com.google.cloud.tools:jib-maven-plugin:1.6.1:dockerBuild failed: Unsupported class file major version 57

@loosebazooka

This comment has been minimized.

Copy link
Member

@loosebazooka loosebazooka commented Sep 23, 2019

Wonder if it's the asm tool. If you explicitly specify a main class in your pom.xml, does it work?

Can you also provide a more detailed error message. Use -X I think

@briandealwis

This comment has been minimized.

Copy link
Member

@briandealwis briandealwis commented Sep 23, 2019

I was able to reproduce and it's due to ASM:

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 57
    at org.objectweb.asm.ClassReader.<init> (ClassReader.java:184)
    at org.objectweb.asm.ClassReader.<init> (ClassReader.java:166)
    at org.objectweb.asm.ClassReader.<init> (ClassReader.java:152)
    at org.objectweb.asm.ClassReader.<init> (ClassReader.java:273)
    at com.google.cloud.tools.jib.frontend.MainClassFinder.findMainClass (MainClassFinder.java:193)
    at com.google.cloud.tools.jib.frontend.MainClassFinder.find (MainClassFinder.java:162)
    at com.google.cloud.tools.jib.plugins.common.MainClassResolver.findMainClassInClassFiles (MainClassResolver.java:120)
    at com.google.cloud.tools.jib.plugins.common.MainClassResolver.resolveMainClass (MainClassResolver.java:60)
    at com.google.cloud.tools.jib.plugins.common.PluginConfigurationProcessor.computeEntrypoint (PluginConfigurationProcessor.java:279)
    at com.google.cloud.tools.jib.plugins.common.PluginConfigurationProcessor.processCommonConfiguration (PluginConfigurationProcessor.java:193)
    at com.google.cloud.tools.jib.plugins.common.PluginConfigurationProcessor.processCommonConfigurationForDockerDaemonImage (PluginConfigurationProcessor.java:81)

@TapaniRundgren the build will succeed if you explicitly specify the mainClass either in your pom or from the command-line with -Djib.container.mainClass=fully.qualified.type.name.

@loosebazooka

This comment has been minimized.

Copy link
Member

@loosebazooka loosebazooka commented Sep 23, 2019

perhaps we can update asm for java 13/14 - https://asm.ow2.io/versions.html

maybe just 13... 14 support is in a beta release.

@loosebazooka loosebazooka added this to the v1.7.0 milestone Sep 23, 2019
@loosebazooka loosebazooka changed the title Support for Java 13? Upgrade ASM to support Java 13 Sep 23, 2019
@TadCordle

This comment has been minimized.

Copy link
Member

@TadCordle TadCordle commented Oct 18, 2019

@TapaniRundgren We've released 1.7.0, which now infers the main class correctly for Java 13/14 projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.