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

WARNING: An illegal reflective access operation has occurred (Gradle, Java 9, Windows 10) #3118

Closed
ghost opened this issue Oct 10, 2017 · 26 comments

Comments

@ghost
Copy link

ghost commented Oct 10, 2017

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

  • Build scan URL:
@blindpirate
Copy link
Collaborator

Please see #2995 for more details and solution.

@oehme
Copy link
Contributor

oehme commented Oct 10, 2017

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 trySetAccessible is misbehaving. This will hopefully be fixed in a future JDK version.

@bw-smarkwell
Copy link

https://issues.apache.org/jira/browse/GROOVY-8339 is the Groovy Ticket which is tracking the issue

@maludwig
Copy link

maludwig commented Mar 8, 2018

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?

@oehme
Copy link
Contributor

oehme commented Mar 8, 2018

Not sure what you mean. Why would we invest in a fix that only works for gradle -version when every other task or command will still print the warning?

@maludwig
Copy link

maludwig commented Mar 9, 2018

Odd, I don't get it on other commands:

[2018-03-09T15:20:22-0700]: mitchell.ludwig@Mitchells-MacBook-Pro:~/dev/playgradle
$ gradle -version
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/local/Cellar/gradle/4.6/libexec/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.6
------------------------------------------------------------

Build time:   2018-02-28 13:36:36 UTC
Revision:     8fa6ce7945b640e6168488e4417f9bb96e4ab46c

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          9.0.4 (Oracle Corporation 9.0.4+11)
OS:           Mac OS X 10.13.3 x86_64

[2018-03-09T15:20:30-0700]: mitchell.ludwig@Mitchells-MacBook-Pro:~/dev/playgradle
$ gradle wrapper
Starting a Gradle Daemon (subsequent builds will be faster)

BUILD SUCCESSFUL in 5s
1 actionable task: 1 up-to-date
[2018-03-09T15:20:41-0700]: mitchell.ludwig@Mitchells-MacBook-Pro:~/dev/playgradle
$ cat build.gradle 
plugins {
    id "base"
}

version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
}

task copy(type: Copy, group: "Custom", description: "Copies sources to the dest directory") {
    from "src"
    into "dest"
}

task zip(type: Zip, group: "Archive", description: "Archives sources in a zip file") {
    from "src"
}
[2018-03-09T15:20:49-0700]: mitchell.ludwig@Mitchells-MacBook-Pro:~/dev/playgradle
$ gradle copy

BUILD SUCCESSFUL in 0s
1 actionable task: 1 up-to-date
[2018-03-09T15:20:59-0700]: mitchell.ludwig@Mitchells-MacBook-Pro:~/dev/playgradle
$ 

@oehme
Copy link
Contributor

oehme commented Mar 10, 2018

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!

@VladyslavKurmaz
Copy link

I got the same issue under MacOS

bash-3.2$ gradle -v
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/local/Cellar/gradle/4.6/libexec/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.6
------------------------------------------------------------

Build time:   2018-02-28 13:36:36 UTC
Revision:     8fa6ce7945b640e6168488e4417f9bb96e4ab46c

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          9 (Oracle Corporation 9+181)
OS:           Mac OS X 10.12.6 x86_64

bash-3.2$ 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)

@yysofiyan
Copy link

yysofiyan commented Mar 12, 2018

192:~ macbookairmd760$ cd
192:~ macbookairmd760$ gradle -v
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/local/Cellar/gradle/4.6/libexec/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.6

Build time: 2018-02-28 13:36:36 UTC
Revision: 8fa6ce7

Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 9.0.4 (Oracle Corporation 9.0.4+11)
OS: Mac OS X 10.13.3 x86_64

192:~ macbookairmd760$

@maludwig
Copy link

Maybe something is specific to OSX? I'm on High Sierra. Maybe it's high? :P

@VladyslavKurmaz
Copy link

VladyslavKurmaz commented Mar 12, 2018

Uninstalling java-9 and installing java-8 solved my issue.
My OS - macOS Sierra 10.12.6

@lanegoolsby
Copy link

Same issue on Windows 10 with IntelliJ

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Users/Lane/.gradle/wrapper/dists/gradle-4.6-bin/4jp4stjndanmxuerzfseyb6wo/gradle-4.6/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.6

Build time: 2018-02-28 13:36:36 UTC
Revision: 8fa6ce7

Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 9.0.4 (Oracle Corporation 9.0.4+11)
OS: Windows 10 10.0 amd64

@donhuvy
Copy link

donhuvy commented Apr 30, 2018

Gradle 4.7

/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:51218,suspend=y,server=n --illegal-access=permit -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=51217 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:/Users/donhuvy/Library/Caches/IntelliJIdea2018.1/groovyHotSwap/gragent.jar -javaagent:/Users/donhuvy/Library/Caches/IntelliJIdea2018.1/captureAgent/debugger-agent.jar=file:/private/var/folders/lj/tgdhz0mx5t54vglcc8982vbc0000gn/T/capture.props -Dfile.encoding=UTF-8 -classpath "/Users/donhuvy/Documents/source_code/github.com/donhuvy/accounting/out/production/classes:/Users/donhuvy/Documents/source_code/github.com/donhuvy/accounting/out/production/resources:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/2.0.1.RELEASE/spring-boot-starter-actuator-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/Users/donhuvy/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.29/tomcat-embed-core-8.5.29.jar:/Users/donhuvy/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.29/tomcat-embed-el-8.5.29.jar:/Users/donhuvy/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.29/tomcat-embed-websocket-8.5.29.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.0.1.RELEASE/spring-boot-starter-tomcat-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/2.0.1.RELEASE/spring-boot-starter-data-jpa-2.0.1.RELEASE.jar:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-security/2.0.1.RELEASE/d573123d27bc3c7333fbc352eced092737c7303f/spring-boot-starter-security-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.0.1.RELEASE/spring-boot-starter-web-2.0.1.RELEASE.jar:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-thymeleaf/2.0.0.RELEASE/3f77dc6b3bfa8e9cc9e0eaa9abc32c5b00b5046a/spring-boot-starter-thymeleaf-2.0.0.RELEASE.jar:/Users/donhuvy/.m2/repository/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar:/Users/donhuvy/.m2/repository/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/com.sun.xml.bind/jaxb-core/2.3.0/d044c784e41d026778693fb44a8026c1fd9a7506/jaxb-core-2.3.0.jar:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/com.sun.xml.bind/jaxb-impl/2.3.0/3a3c6a62719d967175b76b63925f1fb495f11437/jaxb-impl-2.3.0.jar:/Users/donhuvy/.m2/repository/org/thymeleaf/extras/thymeleaf-extras-java8time/3.0.1.RELEASE/thymeleaf-extras-java8time-3.0.1.RELEASE.jar:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/org.thymeleaf.extras/thymeleaf-extras-conditionalcomments/2.1.2.RELEASE/d188a0c94614956d79644b71bdd05098fa4d6a3/thymeleaf-extras-conditionalcomments-2.1.2.RELEASE.jar:/Users/donhuvy/.m2/repository/org/thymeleaf/extras/thymeleaf-extras-springsecurity4/3.0.2.RELEASE/thymeleaf-extras-springsecurity4-3.0.2.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.0.1.RELEASE/spring-boot-starter-aop-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/2.0.1.RELEASE/spring-boot-starter-jdbc-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.0.1.RELEASE/spring-boot-starter-json-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-devtools/2.0.1.RELEASE/spring-boot-devtools-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter/2.0.1.RELEASE/spring-boot-starter-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.0.1.RELEASE/spring-boot-actuator-autoconfigure-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/io/micrometer/micrometer-core/1.0.3/micrometer-core-1.0.3.jar:/Users/donhuvy/.m2/repository/org/hibernate/hibernate-core/5.2.16.Final/hibernate-core-5.2.16.Final.jar:/Users/donhuvy/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar:/Users/donhuvy/.m2/repository/org/springframework/data/spring-data-jpa/2.0.6.RELEASE/spring-data-jpa-2.0.6.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-aspects/5.0.5.RELEASE/spring-aspects-5.0.5.RELEASE.jar:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-config/5.0.4.RELEASE/355fc8c3d1c61fe85915082587946ad346250d85/spring-security-config-5.0.4.RELEASE.jar:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-web/5.0.4.RELEASE/bd2592c928d043f70742fd8ae409f751a63132dd/spring-security-web-5.0.4.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-webmvc/5.0.5.RELEASE/spring-webmvc-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.1.RELEASE/spring-boot-autoconfigure-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-actuator/2.0.1.RELEASE/spring-boot-actuator-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot/2.0.1.RELEASE/spring-boot-2.0.1.RELEASE.jar:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-core/5.0.4.RELEASE/f2924cd62fa8b14546b2b3c31dcd9e55abf9a5e/spring-security-core-5.0.4.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-context/5.0.5.RELEASE/spring-context-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-aop/5.0.5.RELEASE/spring-aop-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.9.Final/hibernate-validator-6.0.9.Final.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-web/5.0.5.RELEASE/spring-web-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/thymeleaf/thymeleaf-spring5/3.0.9.RELEASE/thymeleaf-spring5-3.0.9.RELEASE.jar:/Users/donhuvy/.m2/repository/org/thymeleaf/thymeleaf/3.0.9.RELEASE/thymeleaf-3.0.9.RELEASE.jar:/Users/donhuvy/.m2/repository/com/zaxxer/HikariCP/2.7.8/HikariCP-2.7.8.jar:/Users/donhuvy/.m2/repository/org/springframework/data/spring-data-commons/2.0.6.RELEASE/spring-data-commons-2.0.6.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.0.1.RELEASE/spring-boot-starter-logging-2.0.1.RELEASE.jar:/Users/donhuvy/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/donhuvy/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar:/Users/donhuvy/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/Users/donhuvy/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/donhuvy/.m2/repository/org/attoparser/attoparser/2.0.4.RELEASE/attoparser-2.0.4.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-orm/5.0.5.RELEASE/spring-orm-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-jdbc/5.0.5.RELEASE/spring-jdbc-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-tx/5.0.5.RELEASE/spring-tx-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-beans/5.0.5.RELEASE/spring-beans-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-expression/5.0.5.RELEASE/spring-expression-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-core/5.0.5.RELEASE/spring-core-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/Users/donhuvy/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.5/jackson-datatype-jsr310-2.9.5.jar:/Users/donhuvy/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.5/jackson-datatype-jdk8-2.9.5.jar:/Users/donhuvy/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.5/jackson-module-parameter-names-2.9.5.jar:/Users/donhuvy/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5.jar:/Users/donhuvy/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.10/HdrHistogram-2.1.10.jar:/Users/donhuvy/.m2/repository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar:/Users/donhuvy/.m2/repository/org/aspectj/aspectjweaver/1.8.13/aspectjweaver-1.8.13.jar:/Users/donhuvy/.m2/repository/org/hibernate/common/hibernate-commons-annotations/5.0.1.Final/hibernate-commons-annotations-5.0.1.Final.jar:/Users/donhuvy/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar:/Users/donhuvy/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar:/Users/donhuvy/.m2/repository/ognl/ognl/3.1.12/ognl-3.1.12.jar:/Users/donhuvy/.m2/repository/org/javassist/javassist/3.22.0-GA/javassist-3.22.0-GA.jar:/Users/donhuvy/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/Users/donhuvy/.m2/repository/org/jboss/jandex/2.0.3.Final/jandex-2.0.3.Final.jar:/Users/donhuvy/.m2/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar:/Users/donhuvy/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/donhuvy/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar:/Users/donhuvy/.m2/repository/org/unbescape/unbescape/1.1.5.RELEASE/unbescape-1.1.5.RELEASE.jar:/Users/donhuvy/.m2/repository/org/springframework/spring-jcl/5.0.5.RELEASE/spring-jcl-5.0.5.RELEASE.jar:/Users/donhuvy/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/Users/donhuvy/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.5/jackson-core-2.9.5.jar:/Users/donhuvy/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/donhuvy/.m2/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar" com.donhuvy.AccountingApplication
Connected to the target VM, address: '127.0.0.1:51218', transport: 'socket'
The Class-Path manifest attribute in /Users/donhuvy/.gradle/caches/modules-2/files-2.1/com.sun.xml.bind/jaxb-core/2.3.0/d044c784e41d026778693fb44a8026c1fd9a7506/jaxb-core-2.3.0.jar referenced one or more files that do not exist: file:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/com.sun.xml.bind/jaxb-core/2.3.0/d044c784e41d026778693fb44a8026c1fd9a7506/jaxb-api.jar
The Class-Path manifest attribute in /Users/donhuvy/.gradle/caches/modules-2/files-2.1/com.sun.xml.bind/jaxb-impl/2.3.0/3a3c6a62719d967175b76b63925f1fb495f11437/jaxb-impl-2.3.0.jar referenced one or more files that do not exist: file:/Users/donhuvy/.gradle/caches/modules-2/files-2.1/com.sun.xml.bind/jaxb-impl/2.3.0/3a3c6a62719d967175b76b63925f1fb495f11437/jaxb-core.jar
22:50:24.905 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Included patterns for restart : []
22:50:24.908 [main] DEBUG org.springframework.boot.devtools.settings.DevToolsSettings - Excluded patterns for restart : [/spring-boot-starter-[\w-]+/, /spring-boot/target/classes/, /spring-boot-starter/target/classes/, /spring-boot-devtools/target/classes/, /spring-boot-actuator/target/classes/, /spring-boot-autoconfigure/target/classes/]
22:50:24.908 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/Users/donhuvy/Documents/source_code/github.com/donhuvy/accounting/out/production/classes/, file:/Users/donhuvy/Documents/source_code/github.com/donhuvy/accounting/out/production/resources/]

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.1.RELEASE)

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/Users/donhuvy/.m2/repository/org/springframework/spring-core/5.0.5.RELEASE/spring-core-5.0.5.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
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

@stiofand
Copy link

stiofand commented May 12, 2018

Happens with me running Gradle 4.7 on Java 10 SDK with Ubuntu 18:04 Lts

@jmaciasluque
Copy link

It happens with Maven too, not a Gradle issue per se...

@volare2016
Copy link

Happened to me when I tried to import data using the read.xlsx():

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.util.SAXHelper (file:/Library/Frameworks/R.framework/Versions/3.5/Resources/library/xlsxjars/java/poi-ooxml-3.10.1-20140818.jar) to method com.sun.org.apache.xerces.internal.util.SecurityManager.setEntityExpansionLimit(int)
WARNING: Please consider reporting this to the maintainers of org.apache.poi.util.SAXHelper
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

@Spidermain50
Copy link

Happens with me running Gradle 4.9 on Java 10 SDK with Windows 10 Pro

@marcphilipp
Copy link
Contributor

In case of org.codehaus.groovy.reflection.CachedClass it's a Groovy issue and we'll have to update our Gradle version as soon as there's one that does not produce this warning anymore.

@volare2016 org.apache.poi.util.SAXHelper does not sound like it's called from Gradle core. Where does read.xlsx() come from, a plugin?

@Shonminh
Copy link

Use gradle -v get warning message:

╰─$ gradle -v
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/local/Cellar/gradle/4.9/libexec/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.9
------------------------------------------------------------

Build time:   2018-07-16 08:14:03 UTC
Revision:     efcf8c1cf533b03c70f394f270f46a174c738efc

Kotlin DSL:   0.18.4
Kotlin:       1.2.41
Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          10.0.2 ("Oracle Corporation" 10.0.2+13)
OS:           Mac OS X 10.13.4 x86_64

jdk version is:

╰─$ java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

@oehme
Copy link
Contributor

oehme commented Aug 25, 2018

As explained several times, this is a Groovy issue and can't be fixed by Gradle.

@bw-smarkwell
Copy link

@oehme / @marcphilipp it probably makes sense to lock the issue (believe you can do that in GitHub)

@youzeliang
Copy link

when I use the netty, the situation also happend ,I am trying to change the jdk

@chongiscool
Copy link

Get same issue on Ubuntu 16.04LTS
Use gradle -v get warning msg:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/local/gradle/gradle-4.10/lib/groovy-all-2.4.15.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.10
------------------------------------------------------------

Build time:   2018-08-27 18:35:06 UTC
Revision:     ee3751ed9f2034effc1f0072c2b2ee74b5dce67d

Kotlin DSL:   1.0-rc-3
Kotlin:       1.2.60
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          10.0.1 ("Oracle Corporation" 10.0.1+10)
OS:           Linux 4.15.0-33-generic amd64

and JDK version is:

java 10.0.1 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

@freesOcean
Copy link

Happens with me when I use Mybatis Plus. I solved this problem by update Mybatis Plus Version to 3.2.0.

@steklopod
Copy link

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

@actionsl
Copy link

actionsl commented Sep 16, 2021

Just received a similar error with gradle 7.0.2, Apache Spark and Java 11

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

No branches or pull requests