question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WARNING: An illegal reflective access operation has occurred -> when using public method in non public class

See original GitHub issue

MyBatis version

3.5.6

Database vendor and version

Not important

Steps to reproduce

  1. Create input parameter to be Collections.emptyList()
  2. 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:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
harawatacommented, Jan 10, 2022

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!

1reaction
filiphrcommented, Jan 10, 2022

That is great to hear @harawata. Thanks for letting me know

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found