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

Gradle fails on openjdk-13 #8681

Closed
rickardp opened this issue Mar 4, 2019 · 22 comments

Comments

@rickardp
Copy link

commented Mar 4, 2019

Expected Behavior

Gradle fails to start on openjdk-13.

Current Behavior

When starting Gradle, the following error occurs

FAILURE: Build failed with an exception.

* Where:
Settings file '/src/settings.gradle'

* What went wrong:
Could not compile settings file '/src/settings.gradle'.
> startup failed:
  General error during semantic analysis: Unsupported class file major version 57

  java.lang.IllegalArgumentException: Unsupported class file major version 57
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:184)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:166)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:152)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:273)
        at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
        at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:254)
        at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:192)
        at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:172)
        at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:128)
        at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:59)
        at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClass(AsmReferenceResolver.java:46)
        at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveNonArrayType(AsmReferenceResolver.java:81)
        at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveType(AsmReferenceResolver.java:72)
        at org.codehaus.groovy.ast.decompiled.MemberSignatureParser.createMethodNode(MemberSignatureParser.java:55)
        at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitMembers(DecompiledClassNode.java:195)

Context

I had to use openjdk-13, since version 11 does not support Alpine. I am trying to get Gradle running in an Alpine-based docker image.

Steps to Reproduce (for bugs)

  • Use official openjdk:13-alpine image
  • Install Gradle from tarball
  • Run Gradle on minimal project

Your Environment

Build scan fails with the same exception as above.

@rickardp

This comment has been minimized.

Copy link
Author

commented Mar 4, 2019

Workaround is to keep a separate JDK 8 installation to run Gradle on (this is the only version except for 13 to run on Alpine, because this is what Oracle provided)

@sormuras

This comment has been minimized.

Copy link

commented Mar 12, 2019

Same same for JUnit's build on OpenJDK-13-ea.

sormuras added a commit to junit-team/junit5 that referenced this issue Mar 12, 2019
@marcphilipp

This comment has been minimized.

Copy link
Member

commented Mar 12, 2019

Looks like fixing this requires Groovy 2.5.7 which isn't released, yet:
https://issues.apache.org/jira/browse/GROOVY-9020

marcphilipp added a commit to junit-team/junit5 that referenced this issue Mar 16, 2019
Blocked by gradle/gradle#8681

Issue #1810
@aguibert

This comment has been minimized.

Copy link

commented May 10, 2019

@marcphilipp FYI looks like Groovy 2.5.7 was just released a few days ago: https://github.com/apache/groovy/releases/tag/GROOVY_2_5_7

@szpak

This comment has been minimized.

Copy link
Contributor

commented May 10, 2019

@aguibert Nope, it just a release tag. It's still not available in Maven Central.

@aguibert

This comment has been minimized.

Copy link

commented May 10, 2019

@szpak I see it here: https://repo1.maven.org/maven2/org/codehaus/groovy/groovy/2.5.7/
It very may well have been added within the last 2 hours though

@szpak

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2019

@marcphilipp Has the upgrade to Groovy 2.5.7 unblocked this issue or there is something more to be done on the Groovy side to be able to use Gradle with Java 13?

@aguibert

This comment has been minimized.

Copy link

commented Jun 18, 2019

hi @marcphilipp, any outlook on when Java 13 support will be added? Java 13 entered the rampdown phase recently so it should be stable enough at this point that it's worth kicking the tires.

@marcphilipp

This comment has been minimized.

Copy link
Member

commented Jun 24, 2019

@paplorinc @big-guy Can you provide a timeline for that?

@paplorinc

This comment has been minimized.

Copy link
Member

commented Jun 24, 2019

The Groovy blocker was solved in their latest snapshot, maybe we could try it out.
@big-guy, will you take over?

@snicoll

This comment has been minimized.

Copy link

commented Jul 24, 2019

Can anyone provide a timeline for a fix? We'd like to validate that the upcoming Spring Framework 5.2 release builds fine with Java 13.

@big-guy big-guy added this to the 6.0 RC1 milestone Aug 2, 2019
@big-guy big-guy added the @core label Aug 2, 2019
@paplorinc

This comment has been minimized.

Copy link
Member

commented Aug 5, 2019

Current plans are to target Gradle 6.0 with this, since in Groovy 2.5.5-2.5.7 a few regressions were introduced, i.e.:

+ some performance regressions that our benchmarks have caught.

We're waiting for Groovy 2.5.8 to be released, and see if they were addressed.

cc: @paulk-asert

@jabrena

This comment has been minimized.

Copy link

commented Aug 22, 2019

Many thanks @akarnokd, I go now :)

Th source code compiles but later, I have a problem with the plugin to generate a fat jar:
johnrengelman/shadow#511

But the Gradle part is working.

Many thanks

Juan Antonio

@cocorossello

This comment has been minimized.

Copy link

commented Aug 24, 2019

Works fine for us with jdk-13 b33. Thanks

denis-zhdanov added a commit to denis-zhdanov/kotlin-baker that referenced this issue Sep 16, 2019
#3 Setup CI
java.lang.IllegalArgumentException: Unsupported class file major version 57

gradle/gradle#8681
@big-guy

This comment has been minimized.

Copy link
Member

commented Sep 18, 2019

This will be in 6.0

@big-guy big-guy closed this Sep 18, 2019
@mraible mraible referenced this issue Sep 24, 2019
0 of 4 tasks complete
ZacSweers added a commit to uber/RxDogTag that referenced this issue Sep 27, 2019
ZacSweers added a commit to uber/RxDogTag that referenced this issue Sep 28, 2019
* Rename to just CI

* Add JDK matrix

* Remove 13 because Gradle isn't ready yet until 6.0

gradle/gradle#8681

* Add todo for JDK 13
felixonmars-bot pushed a commit to felixonmars/archlinux-community that referenced this issue Oct 9, 2019
Currently java 13 is incompatible and 12 is EOL, therefor lets hard wire
gradle runtime to java11 until gradle 6 is released.

gradle/gradle#8681

gradle can use other (older) environments if specified accordingly via
its options.


git-svn-id: file:///srv/repos/svn-community/svn@514358 9fca08f4-af9d-4005-b8df-a31f2cc04f65
felixonmars-bot pushed a commit to felixonmars/archlinux-community that referenced this issue Oct 9, 2019
Currently java 13 is incompatible and 12 is EOL, therefor lets hard wire
gradle runtime to java11 until gradle 6 is released.

gradle/gradle#8681

gradle can use other (older) environments if specified accordingly via
its options.

Previous commit didn't take intermediate/generated scripts into account.


git-svn-id: file:///srv/repos/svn-community/svn@514368 9fca08f4-af9d-4005-b8df-a31f2cc04f65
@Mrak2017 Mrak2017 referenced this issue Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.