Skip to content

Reachability metadata not compatible with GraalVM 25 #3220

@sidhantgoel

Description

@sidhantgoel

Describe the bug

Due to

.registerType(java.lang.invoke.MethodHandles.class, MemberCategory.DECLARED_CLASSES)
reachability metadata generated contains the following.

    {
      "type": "java.lang.invoke.MethodHandles",
      "allDeclaredClasses": true
    },

Which is not compatible with GraalVM 25

It results in following error if tracing agent is used with experimental-omit-config-from-classpath option.

native-image-agent: Error: jdk.graal.compiler.util.json.JsonParserException: Unknown attribute(s) [allDeclaredClasses] in reflection class descriptor object
Error occurred during initialization of VM
agent library failed Agent_OnLoad: native-image-agent

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using? Spring boot 4.0.2
  • What modules and versions of springdoc-openapi are you using? springdoc-openapi-starter-webmvc-ui
  • What is the actual and the expected result using OpenAPI Description (yml or json)? json
  • Provide with a sample code (HelloController) or Test that reproduces the problem

Expected behavior

The following command should run successfully.

java -Dspring.aot.enabled=true \
    -agentlib:native-image-agent=config-merge-dir=tapstart-web/src/main/resources/META-INF/native-image,experimental-omit-config-from-classpath -jar tapstart-web/target/tapstart-web-1.0.0.jar

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions