JDK 12+ illegal reflective access operation for `Throwable`, `setCause()`
See original GitHub issue(from mailing list)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.fasterxml.jackson.databind.util.ClassUtil (...) to method java.lang.Throwable.setCause(java.lang.Throwable)
WARNING: Please consider reporting this to the maintainers of com.fasterxml.jackson.databind.util.ClassUtil
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
This is probably due to deserializer constructed in BeanDeserializerFactory.buildThrowableDeserializer()
– ThrowableDeserializer
will handle “cause” property by generating a property. It should use initCause()
, but perhaps there is non-public setCause()
accidentally found…
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:13 (7 by maintainers)
Top Results From Across the Web
An illegal reflective access operation has occurred
I'm using jdk-11 on Linux. When starting the Coherence console tool I get this: WARNING: An illegal reflective access operation has occurred.
Read more >Re: [jackson-user] Illegal reflective access warning in JDK 12
fasterxml.jackson.databind.util.ClassUtil (...) to method > java.lang.Throwable.setCause(java.lang.Throwable) > > WARNING: Please consider ...
Read more >Warning on Illegal reflective access by com.fasterxml.jackson ...
I am getting the below warning intermittently while running my java application, WARNING: All illegal access operations will be denied in a ...
Read more >Java 9 Illegal Reflective Access Warning - Baeldung
Before Java 9, the Java Reflection API has a superpower: It could gain access to the non-public class members without limitation.
Read more >JDK-8214096 sun.security.util.SignatureUtil passes ... - Bug ID
Component: security-libs | Sub-Component: java.security. ... warnings of further illegal reflective access operations WARNING: All illegal access operations ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In my case, this happens with amazon was sdk v1 and databind 2.12.3. Results in runtime exception on Java 16 though, not just warning printout. They try to create an exception from the JSON response like
{"__type":"ExpiredTokenException","message":"The security token included in the request is expired"}
that causes@edudar As usual it’d be necessary to get a reproduction of this: description along is unfortunately not enough. If you can create one, it’d be good to file a separate issue: these typically need to be handled on case-by-case basis as the fundamentally it is not possible to have an overall solution.