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

Build failed with java compilation error #886

Closed
npagare opened this issue May 17, 2021 · 3 comments · Fixed by #894
Closed

Build failed with java compilation error #886

npagare opened this issue May 17, 2021 · 3 comments · Fixed by #894

Comments

@npagare
Copy link

npagare commented May 17, 2021

Updated the repot the commit -

local Java --version


openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)


build on windows 10 pro 64 bit failed

.\gradlew.bat build check test

Task :compileJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileJava'.

java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x87fa3ab) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x87fa3ab

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 5s
2 actionable tasks: 2 executed

@npagare
Copy link
Author

npagare commented May 18, 2021

Hello @eedrummer, how are you ?
Any thoughts ? I am hitting this error for JDK 8, 11, 15 as well as for 16.

Would appreciate your input.

@jawalonoski
Copy link
Member

jawalonoski commented May 18, 2021

It shouldn't fail with older versions of the JDK. You can see that our master branch built with Java 8 and Java 15 just a few days ago: https://github.com/synthetichealth/synthea/actions/runs/842427560

This looks like a Java 16+ error. The solution might be for us to update our Gradle wrapper to the latest version.

gradle/gradle#16641
gradle/gradle#15538

@jawalonoski
Copy link
Member

This should be fixed with PR #894.

If the issue persists, please reopen the issue or add a comment with details.

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.

2 participants