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 build failure with openjdk 16 due to groovy version incompatability #5103

Closed
planetf1 opened this issue Apr 30, 2021 · 1 comment · Fixed by #5106
Closed

Gradle build failure with openjdk 16 due to groovy version incompatability #5103

planetf1 opened this issue Apr 30, 2021 · 1 comment · Fixed by #5106
Assignees
Labels
java Pull requests that update Java code

Comments

@planetf1
Copy link
Member

$ ./gradlew build                                                                                          [12:05:06]
Picked up JAVA_TOOL_OPTIONS: --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/jonesn/IdeaProjects/egeria.maven/build.gradle'

* What went wrong:
Could not compile build file '/Users/jonesn/IdeaProjects/egeria.maven/build.gradle'.
> startup failed:
  General error during semantic analysis: Unsupported class file major version 60

  java.lang.IllegalArgumentException: Unsupported class file major version 60
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:163)
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:284)
        at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
        at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
        at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
        at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
        at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
        at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:57)

We do not see issues with maven - which uses groovy for FVTs, but this appears to be gradle itself

We are currently running gradle 6.8.3:

$ ./gradlew -version                                                                                       [12:09:38]
Picked up JAVA_TOOL_OPTIONS: --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED

------------------------------------------------------------
Gradle 6.8.3
------------------------------------------------------------

Build time:   2021-02-22 16:13:28 UTC
Revision:     9e26b4a9ebb910eaa1b8da8ff8575e514bc61c78

Kotlin:       1.4.20
Groovy:       2.5.12
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          11.0.11 (Azul Systems, Inc. 11.0.11+9-LTS)
OS:           Mac OS X 11.4 x86_64
@planetf1 planetf1 added the java Pull requests that update Java code label Apr 30, 2021
planetf1 added a commit to planetf1/egeria that referenced this issue Apr 30, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
@planetf1
Copy link
Member Author

The groovy issue itself can be resolved by moving to gradle 7, which supports openjdk 16.
However gradle 7 adds further validation on task attributes, which currently the execfork plugin we use fails on - issue opened on that project,.

@planetf1 planetf1 self-assigned this Apr 30, 2021
planetf1 added a commit to planetf1/egeria that referenced this issue May 21, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria that referenced this issue May 21, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit to planetf1/egeria that referenced this issue May 21, 2021
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
planetf1 added a commit that referenced this issue May 21, 2021
#5103 Support JDK 16 in gradle build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java Pull requests that update Java code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant