#7486·graal

Fatal Error: Cannot invoke method that has a @CallerSensitiveAdapter without an explicit caller in GraalVM 20/21

Author: lispycloudsCreated Sep 24, 2023Updated Sep 8, 2026
Labelsbugnative-image

Describe the issue We are facing a reflective access issue as part of the Babashka project when trying to look up a class by name.

Steps to reproduce the issue Repo with minimal Java code that reproduces the issue: https://github.com/lispyclouds/graalvm21-reflection-issue Has all the steps and debugging info.

Describe GraalVM and your environment:

  • GraalVM version: EE 21, EE 20, CE 21, CE 20
  • JDK major version: 21, 20
  • OS: Linux, MacOS Ventura
  • Architecture: amd64, aarch64

Error log Important excerpts (full log in repro repo):

Fatal error: Cannot invoke method that has a @CallerSensitiveAdapter without an explicit caller

...

Stacktrace for the failing thread 0x0000000002f23300 (A=AOT compiled, J=JIT compiled, D=deoptimized, i=inlined):
  i  SP 0x00007ffc797bdfc0 IP 0x00000000005347be size=32    com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:148)
  i  SP 0x00007ffc797bdfc0 IP 0x00000000005347be size=32    com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:141)
  A  SP 0x00007ffc797bdfc0 IP 0x00000000005347be size=32    com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:90)
  A  SP 0x00007ffc797bdfe0 IP 0x00000000004ef469 size=64    com.oracle.svm.core.reflect.SubstrateMethodAccessor.invoke(SubstrateMethodAccessor.java:112)
  i  SP 0x00007ffc797be020 IP 0x000000000040610d size=48    java.lang.reflect.Method.invoke(Method.java:580)
  A  SP 0x00007ffc797be020 IP 0x000000000040610d size=48    ReflectionIssue.main(ReflectionIssue.java:5)
  i  SP 0x00007ffc797be050 IP 0x000000000040f6e5 size=16    java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
  i  SP 0x00007ffc797be050 IP 0x000000000040f6e5 size=16    com.oracle.svm.core.JavaMainWrapper.invokeMain(JavaMainWrapper.java:181)
  A  SP 0x00007ffc797be050 IP 0x000000000040f6e5 size=16    com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:237)
  i  SP 0x00007ffc797be060 IP 0x00000000004334ed size=112   com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:204)
  i  SP 0x00007ffc797be060 IP 0x00000000004334ed size=112   com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:293)
  i  SP 0x00007ffc797be060 IP 0x00000000004334ed size=112   com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:279)
  A  SP 0x00007ffc797be060 IP 0x00000000004334ed size=112   com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(IsolateEnterStub.java:0)

...

Fatal error: Cannot invoke method that has a @CallerSensitiveAdapter without an explicit caller