WARNING: An illegal reflective access operation has occurred -> when using public method in non public class
See original GitHub issueMyBatis version
3.5.6
Database vendor and version
Not important
Steps to reproduce
- Create input parameter to be
Collections.emptyList()
- Use input parameter in a
test
expression in XML e.g.parameter.isEmpty()
Expected result
No illegal reflective access warning
Actual result
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.ibatis.ognl.AccessibleObjectHandlerPreJDK9 (file:/~/.m2/repository/org/mybatis/mybatis/3.5.6/mybatis-3.5.6.jar) to method java.util.Collections$EmptyList.isEmpty() WARNING: Please consider reporting this to the maintainers of org.apache.ibatis.ognl.AccessibleObjectHandlerPreJDK9 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
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 >What is an illegal reflective access? - java - Stack Overflow
WARNING : Illegal reflective access by $PERPETRATOR to $VICTIM ... An illegal reflective access operation has occurred. org.python.core.
Read more >An illegal reflective access operation has occurred when ...
Java Agent: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.forgerock.openam.sdk.com.
Read more >Illegal access in Java 16 A.K.A. 'My program crashes!'
WARNING : An illegal reflective access operation has occurred ... Some methods might be public, some fields might be private, for example.
Read more >12639 - WARNING: An illegal reflective access operation has ...
The Guice (assisted inject) and Guava (IoUtils) libraries have been developed on Java 8 where the module system did not exist and therefore...
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 Free
Top 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
This should be fixed by #2423
The OGNL issue is https://github.com/jkuhnert/ognl/pull/144 (big thanks to @Farbfetzen !)
You can verify the fix with 3.5.10-SNAPSHOT . If there still is an issue with the snapshot, please report the details.
Thank you for the report!
That is great to hear @harawata. Thanks for letting me know