Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

The new messages for reflection look like:

Cannot reflectively access the class 'HelloWorld$TargetClass'. To allow this operation, add the following to the 'reflection' section of the 'reachability-metadata.json' and rebuild the native image:

   {
     "type": "HelloWorld$TargetClass"
   }

The 'reachability-metadata.json' file should be located in 'META-INF/native-image/<group-id>/<artifact-id>/' of your project. For further help, see https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection

Cannot reflectively access the proxy class inheriting ['java.lang.Runnable']. To allow this operation, add the following to the 'reflection' section of the 'reachability-metadata.json' and rebuild the native image:

   {
     "type": {
       "proxy": [
         "java.lang.Runnable"
       ]
     }
   }

The 'reachability-metadata.json' file should be located in 'META-INF/native-image/<group-id>/<artifact-id>/' of your project. For further help, see https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection

Cannot reflectively access the lambda-proxy class declared in 'HelloWorld' inheriting ['java.lang.Runnable']. To allow this operation, add the following to the 'reflection' section of the 'reachability-metadata.json' and rebuild the native image:

   {
     "type": {
       "lambda": {
         "declaringClass": "HelloWorld",
         "interfaces": [
           "java.lang.Runnable"
         ]
       }
     }
   }

The 'reachability-metadata.json' file should be located in 'META-INF/native-image/<group-id>/<artifact-id>/' of your project. For further help, see https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection

And for resources:

Cannot access resource at path 'path/to/resource'. To allow this operation, add the following to the 'resources' section of the 'reachability-metadata.json' and rebuild the native image:

   {
     "glob": "path/to/resource"
   }

The 'reachability-metadata.json' file should be located in 'META-INF/native-image/<group-id>/<artifact-id>/' of your project. For further help, see https://www.graalvm.org/latest/reference-manual/native-image/metadata/#resources

Other access will have a similar shape.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 1, 2025
@graalvmbot graalvmbot force-pushed the vj/GR-65589-fix-reflection-error-messages branch 5 times, most recently from 4e352e4 to 2284463 Compare July 2, 2025 16:34
@graalvmbot graalvmbot force-pushed the vj/GR-65589-fix-reflection-error-messages branch 2 times, most recently from b375545 to 2a28fc1 Compare July 3, 2025 12:43
@graalvmbot graalvmbot force-pushed the vj/GR-65589-fix-reflection-error-messages branch from 2a28fc1 to c5d892d Compare July 3, 2025 16:12
@graalvmbot graalvmbot merged commit b6f8562 into master Jul 8, 2025
13 checks passed
@graalvmbot graalvmbot deleted the vj/GR-65589-fix-reflection-error-messages branch July 8, 2025 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants