Reputation: 57
I have a problem with Spring Application using Spring Boot.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/User/.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
I have JDK 9.0, Spring Boot 2.0.4.RELEASE (Now i change dependency to 2.0.5.RELEASE but the Spring Core not actualizedd. I see that Spring Core is 5.0.9.
What is the problem?
Upvotes: 2
Views: 11564
Reputation: 1647
I've had the same issue, it's because of version mismatch. It can be a Java version issue or dependency version issue.
Check you run configurations and rebuild your dependencies, then it will work fine.
Upvotes: 0
Reputation:
I had the same issue with Spring Boot 2.1.12. Removing the org.springframework.boot:spring-boot-devtools dependency solved the problem for me. It seems to be a known problem (according to several GitHub Issues I've found.
Upvotes: 3
Reputation: 1
I have the same issue on Spring 2.1.3.RELEASE. I noticed that the warning is thrown when a class implements HttpSessionListener without overriding the default method sessionCreated. I override the method and the warning is not thrown any more.
Upvotes: 0
Reputation: 3743
This is a known bug and should be (somewhat?) fixed in Spring Framework 5.1. It will ship with the upcoming Spring Boot 2.1 (we're at milestone 4 atm).
Upvotes: 0