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

Packaging native image fails with SmallRye GraphQL #12452

Closed
jefrajames opened this issue Oct 1, 2020 · 3 comments · Fixed by #12481
Closed

Packaging native image fails with SmallRye GraphQL #12452

jefrajames opened this issue Oct 1, 2020 · 3 comments · Fixed by #12481
Labels
Milestone

Comments

@jefrajames
Copy link

Describe the bug
When using SmallRye GraphQL, packaging a native image fails with the following error:

com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Class initialization of io.smallrye.graphql.cdi.validation.ValidationService failed ... Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.smallrye.graphql.cdi.validation.ValidationService

This error is solved with the following workaround in application.properties:

quarkus.native.additional-build-args= --initialize-at-run-time=io.smallrye.graphql.cdi.validation.ValidationService

Buty I guess this not a normal situation.

Expected behavior

mvn package -Pnative
working

Actual behavior

mvn package -Pnative
failing

To Reproduce
This GitHub project reproduces the error.

Configuration

# Add your application.properties here, if applicable.
quarkus.native.additional-build-args= --initialize-at-run-time=io.smallrye.graphql.cdi.validation.ValidationService

Environment (please complete the following information):

  • macOS 10.13.6
  • OpenJDK 11.0.7
  • GraalVM CE 20.20.0
  • Maven 3.6.3

Additional context
It works in Java mode.

@jefrajames jefrajames added the kind/bug Something isn't working label Oct 1, 2020
@quarkusbot
Copy link

@phillip-kruger
Copy link
Member

Thanks @jefrajames ! I am looking at it .

@phillip-kruger phillip-kruger self-assigned this Oct 1, 2020
@phillip-kruger
Copy link
Member

I tested this (your reproducer) against (my) snapshot, and it seems like it's already fixed. Should be ok for 1.9.0. Closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants