Illegal reflective access on shutdown of ExecutorService #22939
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Affects: spring-core-5.1.6.RELEASE
I'm migrating an application to Open JDK 11.0.2, and updated its Spring Boot from v1.5 to v2.1.4, that in turn updates SpringFramework to v5.1.6. My application runs several threads, and I implemented an EventListener for the situation when an administrator shuts down the application and the Context is stopped or closed the application tries to gracefully shutdown the child threads managed by an ExecutorService.
Good news is that everything shuts down. But I do get the following warning with JDK 11:
My problem appears similar to Issues #22791 and #22242. I've attached a sample project to recreate the error when you use JDK 11, just run the included JUnit class and use the VM arg
--illegal-access=debug
to see the stacktrace.reflective-access-threads.zip
The text was updated successfully, but these errors were encountered: