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 to Groovy 2.4.12 for full Java 9 compatibility #2995
Comments
Groovy 2.4.12 seems to have the same problem:
|
@BeneStem Thanks for reporting. That's just warning. Groovy uses too much reflection and Java 9 is much more restrictive concerning reflective access to non-public fields/methods. However, there's still something we can try to remove this warning. Reference: https://blog.codefx.org/java/java-9-migration-guide/#Illegal-Access-To-Internal-APIs |
I am using Windows 10 x64 pro. same error
|
@donhuvy @BeneStem Thanks for reporting. Actually this warning is on Groovy side and there's not much we can do. You can add the following arguments to
|
The upgrade was done: 7873630 |
https://issues.apache.org/jira/browse/GROOVY-8339 is the Groovy Ticket which is tracking the issue |
Minimum for Groovy on JDK9 is 2.4.12, ref gradle/gradle#2995 .
Minimum for Groovy on JDK9 is 2.4.12, ref gradle/gradle#2995 . Progress towards JDK9 akhikhl#390.
Minimum for Groovy on JDK9 is 2.4.12, ref gradle/gradle#2995 . Progress towards JDK9 akhikhl#390.
Minimum for Groovy on JDK9 is 2.4.12, ref gradle/gradle#2995 . Progress towards JDK9 akhikhl#390.
Still having this issue with latest version |
@dginovker The issue was that the build would fail. The warnings are expected and we can do nothing about them until Groovy somehow works around the new JDK limitations (or the JDK offers a better API for Groovy to use). |
I see the same, issue still persists. ."C:\Program Files\Java\jdk-9.0.4\bin\java" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.7\lib\idea_rt.jar=56089:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.7\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.7\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.7\plugins\testng\lib\testng-plugin.jar;C:\Users\a624204\IdeaProjects\SampleProjectName\target\test-classes;C:\Users\a624204.m2\repository\io\rest-assured\rest-assured\3.0.7\rest-assured-3.0.7.jar;C:\Users\a624204.m2\repository\org\codehaus\groovy\groovy\2.4.12\groovy-2.4.12.jar;C:\Users\a624204.m2\repository\org\codehaus\groovy\groovy-xml\2.4.12\groovy-xml-2.4.12.jar;C:\Users\a624204.m2\repository\org\apache\httpcomponents\httpclient\4.5.3\httpclient-4.5.3.jar;C:\Users\a624204.m2\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\a624204.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\a624204.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;C:\Users\a624204.m2\repository\org\apache\httpcomponents\httpmime\4.5.1\httpmime-4.5.1.jar;C:\Users\a624204.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\a624204.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\a624204.m2\repository\org\ccil\cowan\tagsoup\tagsoup\1.2.1\tagsoup-1.2.1.jar;C:\Users\a624204.m2\repository\io\rest-assured\json-path\3.0.7\json-path-3.0.7.jar;C:\Users\a624204.m2\repository\org\codehaus\groovy\groovy-json\2.4.12\groovy-json-2.4.12.jar;C:\Users\a624204.m2\repository\io\rest-assured\rest-assured-common\3.0.7\rest-assured-common-3.0.7.jar;C:\Users\a624204.m2\repository\io\rest-assured\xml-path\3.0.7\xml-path-3.0.7.jar;C:\Users\a624204.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\a624204.m2\repository\javax\xml\bind\jaxb-api\2.2.12\jaxb-api-2.2.12.jar;C:\Users\a624204.m2\repository\org\testng\testng\6.14.2\testng-6.14.2.jar;C:\Users\a624204.m2\repository\com\beust\jcommander\1.72\jcommander-1.72.jar;C:\Users\a624204.m2\repository\org\apache-extras\beanshell\bsh\2.0b6\bsh-2.0b6.jar;C:\Users\a624204.m2\repository\com\android\tools\build\gradle\2.3.0\gradle-2.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\build\gradle-core\2.3.0\gradle-core-2.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\build\builder\2.3.0\builder-2.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\build\builder-model\2.3.0\builder-model-2.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\build\builder-test-api\2.3.0\builder-test-api-2.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\sdklib\25.3.0\sdklib-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\layoutlib\layoutlib-api\25.3.0\layoutlib-api-25.3.0.jar;C:\Users\a624204.m2\repository\com\intellij\annotations\12.0\annotations-12.0.jar;C:\Users\a624204.m2\repository\com\android\tools\dvlib\25.3.0\dvlib-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\repository\25.3.0\repository-25.3.0.jar;C:\Users\a624204.m2\repository\com\google\jimfs\jimfs\1.1\jimfs-1.1.jar;C:\Users\a624204.m2\repository\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;C:\Users\a624204.m2\repository\org\apache\commons\commons-compress\1.8.1\commons-compress-1.8.1.jar;C:\Users\a624204.m2\repository\com\android\tools\sdk-common\25.3.0\sdk-common-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\common\25.3.0\common-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\build\manifest-merger\25.3.0\manifest-merger-25.3.0.jar;C:\Users\a624204.m2\repository\net\sf\kxml\kxml2\2.3.0\kxml2-2.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\ddms\ddmlib\25.3.0\ddmlib-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\jack\jack-api\0.13.0\jack-api-0.13.0.jar;C:\Users\a624204.m2\repository\com\android\tools\jill\jill-api\0.10.0\jill-api-0.10.0.jar;C:\Users\a624204.m2\repository\com\android\tools\analytics-library\protos\25.3.0\protos-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\analytics-library\shared\25.3.0\shared-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\analytics-library\tracker\25.3.0\tracker-25.3.0.jar;C:\Users\a624204.m2\repository\com\squareup\javawriter\2.5.0\javawriter-2.5.0.jar;C:\Users\a624204.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.48\bcpkix-jdk15on-1.48.jar;C:\Users\a624204.m2\repository\org\bouncycastle\bcprov-jdk15on\1.48\bcprov-jdk15on-1.48.jar;C:\Users\a624204.m2\repository\org\ow2\asm\asm-tree\5.0.4\asm-tree-5.0.4.jar;C:\Users\a624204.m2\repository\com\android\tools\lint\lint\25.3.0\lint-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\lint\lint-checks\25.3.0\lint-checks-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\lint\lint-api\25.3.0\lint-api-25.3.0.jar;C:\Users\a624204.m2\repository\com\android\tools\external\com-intellij\uast\162.2228.14\uast-162.2228.14.jar;C:\Users\a624204.m2\repository\com\android\tools\external\lombok\lombok-ast\0.2.3\lombok-ast-0.2.3.jar;C:\Users\a624204.m2\repository\org\ow2\asm\asm-analysis\5.0.4\asm-analysis-5.0.4.jar;C:\Users\a624204.m2\repository\org\eclipse\jdt\core\compiler\ecj\4.6.1\ecj-4.6.1.jar;C:\Users\a624204.m2\repository\com\android\tools\build\transform-api\2.0.0-deprecated-use-gradle-api\transform-api-2.0.0-deprecated-use-gradle-api.jar;C:\Users\a624204.m2\repository\com\android\tools\build\gradle-api\2.3.0\gradle-api-2.3.0.jar;C:\Users\a624204.m2\repository\com\google\guava\guava\18.0\guava-18.0.jar;C:\Users\a624204.m2\repository\com\android\databinding\compilerCommon\2.3.0\compilerCommon-2.3.0.jar;C:\Users\a624204.m2\repository\com\android\databinding\baseLibrary\2.3.0\baseLibrary-2.3.0.jar;C:\Users\a624204.m2\repository\org\antlr\antlr4\4.5.3\antlr4-4.5.3.jar;C:\Users\a624204.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\a624204.m2\repository\com\googlecode\juniversalchardet\juniversalchardet\1.0.3\juniversalchardet-1.0.3.jar;C:\Users\a624204.m2\repository\com\android\tools\annotations\24.5.0\annotations-24.5.0.jar;C:\Users\a624204.m2\repository\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;C:\Users\a624204.m2\repository\org\ow2\asm\asm-commons\5.0.4\asm-commons-5.0.4.jar;C:\Users\a624204.m2\repository\net\sf\proguard\proguard-gradle\5.3.2\proguard-gradle-5.3.2.jar;C:\Users\a624204.m2\repository\net\sf\proguard\proguard-base\5.3.2\proguard-base-5.3.2.jar;C:\Users\a624204.m2\repository\org\jacoco\org.jacoco.core\0.7.5.201505241946\org.jacoco.core-0.7.5.201505241946.jar;C:\Users\a624204.m2\repository\org\ow2\asm\asm-debug-all\5.0.1\asm-debug-all-5.0.1.jar;C:\Users\a624204.m2\repository\org\jacoco\org.jacoco.report\0.7.5.201505241946\org.jacoco.report-0.7.5.201505241946.jar;C:\Users\a624204.m2\repository\net\sf\jopt-simple\jopt-simple\4.9\jopt-simple-4.9.jar;C:\Users\a624204.m2\repository\com\google\protobuf\protobuf-java\3.0.0\protobuf-java-3.0.0.jar;C:\Users\a624204.m2\repository\org\antlr\antlr\3.5.2\antlr-3.5.2.jar;C:\Users\a624204.m2\repository\org\antlr\antlr-runtime\3.5.2\antlr-runtime-3.5.2.jar;C:\Users\a624204.m2\repository\org\antlr\ST4\4.0.8\ST4-4.0.8.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.7\plugins\testng\lib\jcommander.jar" org.testng.RemoteTestNGStarter -usedefaultlisteners false -socket56088 @w@C:\Users\a624204\AppData\Local\Temp\idea_working_dirs_testng.tmp -temp C:\Users\a624204\AppData\Local\Temp\idea_testng.tmp java.net.ConnectException: Connection timed out: connect |
Clearly the problem is with Groovy. Is there a matrix someplace showing what versions of Groovy work with Java 10 (aka 18.03 -- Java 9 is superseded)? With Groovy 6.4.12 and Gradle 4.4 with the JAVA_HOME pointed to Java 10 JDK
I switched back to Java 8 JDK. I guess i can build with Java 10 compiler. Just can't build any of my Groovy code. The Groovy download page confused me. There are many different versions and betas. They must be overstaffed on that project. An interesting point though. I only changed my JAVA_HOME to point to the Java 8 JDK and I see this:
I guess it's a workaround until what ever is not fixed gets fixed. |
tried Groovy 2.4.14, which seems to be latest release version. Fails on Java 10.
|
Update -- The relevant Groovy project issue is here: I suggest we get behind it as it has a low priority, it seems. As it has been CLOSED. |
2.4.15 fails on OS X with java 10: ➜ ~ groovy --version |
Why was this closed? This still doesn't work. |
Agree. Why is this closed? "WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass" Maintainers?? $ groovy -version |
@aplatypus @mindthump @nshusa @goldparrot That's not an error but a warning that will eventually be resolved in Groovy for good. This issue was about making Gradle fully compatible with Java 9 and upgrading to 2.4.12 which has both been done. |
In Java 10, this is an error, not just a warning. |
This issue is not about Java 10. This can only be fully resolved by a major version upgrade for Groovy, which we can only do in Gradle 5.0. |
@oehme I guess this not currently in the |
Groovy has not been fixed, so nothing to upgrade on our side. I'm tempted to just filter the warnings out for now, since there is nothing we or the user can do. |
Got same issue with Java 11:
|
Same here, hope this can be resolved soon:
|
@joelhandwell The same for me, on JDK 11. any solution? I have no groovy on my machine |
The warning is no longer shown when using Gradle 5.0 on Java 11. |
Expected Behavior
Gradle supports Oracle JDK 9 fully.
Current Behavior
Gradle doesn't support Oracle JDK 9 fully.
Context
JDK 9 final has been released, however, looks like Gradle isn't fully compatible with it.
This is due to the usage of new ElementType.MODULE. Groovy 2.4.12 seems to support
MODULE
but 2.4.11 doesn't.Steps to Reproduce (for bugs)
Install Oracle JDK9, and run
./gradlew check
in Gradle project.Your Environment
Note the warning in the top.
The text was updated successfully, but these errors were encountered: