-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
WARNING: An illegal reflective access operation has occurred (Gradle, Java 9, Windows 10) #3118
Comments
Please see #2995 for more details and solution. |
The linked ticket contains a workaround, but not really a solution. The real issue is a problem in the JDK. There is actually no illegal access, but the JDK method |
https://issues.apache.org/jira/browse/GROOVY-8339 is the Groovy Ticket which is tracking the issue |
So, as much as we could pass this off to the JDK for being silly, I think it's totally within our power to simply output a version number without seeing an error. We don't need Reflection in order to spit out a version...right? |
Not sure what you mean. Why would we invest in a fix that only works for |
Odd, I don't get it on other commands:
|
That is surprising indeed. Last time I checked this always happened when the Groovy Runtime was loaded (i.e. on every build). Thanks for checking! |
I got the same issue under MacOS
|
192:~ macbookairmd760$ cd Gradle 4.6Build time: 2018-02-28 13:36:36 UTC Groovy: 2.4.12 192:~ macbookairmd760$ |
Maybe something is specific to OSX? I'm on High Sierra. Maybe it's high? :P |
Uninstalling java-9 and installing java-8 solved my issue. |
Same issue on Windows 10 with IntelliJ WARNING: An illegal reflective access operation has occurred Gradle 4.6Build time: 2018-02-28 13:36:36 UTC Groovy: 2.4.12 |
Gradle 4.7
|
Happens with me running Gradle 4.7 on Java 10 SDK with Ubuntu 18:04 Lts |
It happens with Maven too, not a Gradle issue per se... |
Happened to me when I tried to import data using the read.xlsx():
|
Happens with me running Gradle 4.9 on Java 10 SDK with Windows 10 Pro |
In case of @volare2016 |
Use
jdk version is:
|
As explained several times, this is a Groovy issue and can't be fixed by Gradle. |
@oehme / @marcphilipp it probably makes sense to lock the issue (believe you can do that in GitHub) |
when I use the netty, the situation also happend ,I am trying to change the jdk |
Get same issue on Ubuntu 16.04LTS
and JDK version is:
|
Happens with me when I use Mybatis Plus. I solved this problem by update Mybatis Plus Version to 3.2.0. |
Maven + Java 11: [WARNING] 'tools.jar' was not found, kapt may work unreliably
[INFO] Applied plugin: 'spring'
[INFO] Applied plugin: 'all-open'
[INFO] Applied plugin: 'no-arg'
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jetbrains.kotlin.kapt3.base.javac.KaptJavaFileManager (file:/C:/Users/dkoltovich/.m2/repository/org/jetbrains/kotlin/kotlin-annotation-processing-maven/1.3.61/kotlin-annotation-processing-maven-1.3.61.jar) to method com.sun.tools.javac.file.BaseFileManager.handleOption(com.sun.tools.javac.main.Option,java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.jetbrains.kotlin.kapt3.base.javac.KaptJavaFileManager
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release |
Just received a similar error with gradle 7.0.2, Apache Spark and Java 11 |
input command gradle -version (Windows 10)
Expected Behavior
Gradle 4.2.1
Build time: 2017-10-02 15:36:21 UTC
Revision: a88ebd6
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 9 (Oracle Corporation 9+181)
OS: Windows 10 10.0 amd64
C:\Windows\system32>java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
Current Behavior
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/gradle/lib/groovy-all-2.4.12.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Gradle 4.2.1
Build time: 2017-10-02 15:36:21 UTC
Revision: a88ebd6
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 9 (Oracle Corporation 9+181)
OS: Windows 10 10.0 amd64
C:\Windows\system32>java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
Context
trying to build projects with gradle using java 9 wondering is this will be a problem
Steps to Reproduce (for bugs)
no current project
Your Environment
The text was updated successfully, but these errors were encountered: