Skip to content

Smallrye Health extension doesn't work in native #1482

@xstefank

Description

@xstefank

Generating project without REST endpoint:

mvn io.quarkus:quarkus-maven-plugin:0.11.0:create \
    -DprojectGroupId=io.xstefank \
    -DprojectArtifactId=health-test

and adding smallrye-health:

mvn quarkus:add-extension -Dextensions="smallrye-health"

Compiling to native and then accessing /health results in:

java.lang.InstantiationException: Type org.glassfish.json.JsonProviderImpl can not be instantiated reflectively as it does not have a no-parameter constructor or the no-parameter constructor has not been added explicitly to the native image.

full stacktrace: https://pastebin.com/eupq0e5n

This class is added for reflective access only in ResteasyJsonbProcessor however smallrye-health uses JSON-P in SmallRyeHealthReporter.

I believe that smallrye-health extension should also register "org.glassfish.json.JsonProviderImp" for reflective access.

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions