Reputation: 1275
I added new two dependencies to my demo application which are spring integration and spring integration file. After that I get the following warning in my console. Application works fine but it bothers me.
How can I overcome this issue?
WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/C:/Users/TECH%20WORLD/.m2/repository/org/springframework/spring-core/5.3.7/spring-core-5.3.7.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class)
My project's SDK is version 15.0.2
Spring boot version
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
Added dependencies
<!-- https://mvnrepository.com/artifact/org.springframework.integration/spring-integration-core -->
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
<version>5.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.integration/spring-integration-file -->
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-file</artifactId>
<version>5.5.0</version>
</dependency>
Upvotes: 4
Views: 8633
Reputation: 1275
This question is answered by the following question! Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1
It is noted that this is a a known Spring bug.
According to the findings this happens because when the new JDK 9 module system detected an illegal access that will be maybe disallowed in the future.
There are further readings... Java Platform, Standard Edition
Upvotes: 1