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
Closed

Upgrade ASM to support Java 13 #2015

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

Comments

@TapaniRundgren
Copy link

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Contributor

@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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants