Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smallrye Health extension doesn't work in native #1482

Closed
xstefank opened this issue Mar 14, 2019 · 3 comments
Closed

Smallrye Health extension doesn't work in native #1482

xstefank opened this issue Mar 14, 2019 · 3 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@xstefank
Copy link
Member

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.

@gsmet
Copy link
Member

gsmet commented Mar 14, 2019

OK, this goes in parallel to #1480 .

I think we will need some low level JSON-B/JSON-P library setting everything up and added as a dependency for everyone that needs it.

@gsmet gsmet self-assigned this Mar 14, 2019
@xstefank
Copy link
Member Author

@gsmet ok, thanks, I will leave it then to you

@gsmet gsmet added the kind/bug Something isn't working label Mar 14, 2019
gsmet added a commit to gsmet/quarkus that referenced this issue Mar 15, 2019
I haven't added a FeatureBuildItem as I don't think they are worth an
item in the feature list at startup.

Fixes quarkusio#1480 and quarkusio#1482 and a few other issues in passing.
gsmet added a commit to gsmet/quarkus that referenced this issue Mar 16, 2019
I haven't added a FeatureBuildItem as I don't think they are worth an
item in the feature list at startup.

Fixes quarkusio#1480 and quarkusio#1482 and a few other issues in passing.
gsmet added a commit to gsmet/quarkus that referenced this issue Mar 19, 2019
I haven't added a FeatureBuildItem as I don't think they are worth an
item in the feature list at startup.

Fixes quarkusio#1480 and quarkusio#1482 and a few other issues in passing.
@gsmet gsmet added this to the 0.12.0 milestone Mar 19, 2019
@gsmet
Copy link
Member

gsmet commented Mar 19, 2019

It should be fixed in tomorrow's release.

@gsmet gsmet closed this as completed Mar 19, 2019
maxandersen pushed a commit to maxandersen/quarkus that referenced this issue Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants