https://kotlinlang.org logo
#mockk
Title
# mockk
p

Patrick Ramsey

05/18/2021, 5:11 PM
I just wrote a bunch of tests, that passed just fine on java 8, but when I ran them on java 11 (which is what our build box has) I got this warning:
Copy code
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access using Lookup on io.mockk.proxy.jvm.ClassLoadingStrategyChooser (file:/home/circleci/.gradle/caches/transforms-2/files-2.1/5bf8247b5024cc1f3e5041b83c85dfb2/jetified-mockk-agent-jvm-1.10.6.jar) to class javax.xml.parsers.DocumentBuilder
WARNING: Please consider reporting this to the maintainers of io.mockk.proxy.jvm.ClassLoadingStrategyChooser
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
Not sure if it’s related, but four tests then fail with NoClassDefFoundException: io/mockk/proxy/jvm/advice/jvm/JvmMockKProxyInterceptor
… but always in tests that used mockk.
I haven’t made a lot of headway figuring out what’s going on. It’s only affecting a few of my tests, and the ones it’s affecting are very simple
has anyone else seen this behavior / does anyone else know what’s going on?
I see a similar bug here: https://github.com/mockk/mockk/issues/520 But it was closed for inactivity
.The common thread seems to be, when I try to mock anything in javax.xml.
2 Views