Closed mraible closed 2 years ago
Have you tried before upgrading GraalVM? Because we have several native builds that don't succeed atm: https://github.com/jhipster/generator-jhipster-quarkus/actions/runs/1157084906
@avdev4j Yes. If you look at my comment above, it works with the previous version.
If I downgrade to 21.0.0.2.r11-grl, it works:
I missed that. The Native builds have been very hard to fix, now we are moving to Quarkus 2, I think we should first finish this migration and then fix all the builds. I'm afraid incoming work will break them again.
this ticket makes me think we should fix all the native builds, the main branch is not stable yet since we are upgrading to Quarkus 2.
Raising bounty so I can make some money when I fix this. :)
Post upgrade, I don't see an issue with native image build/startup. Can you try latest branch code to see if this works for you as well?
With #247 changes, I tried using 22.2.r17-grl
Graal VM image and didn't observe the issue. You now need to explicitly specify the quarkus profile to use for native image build like ./mvnw package -Pnative,prod -DskipTests
I was able to successfully build a native image with GraalVM CE 22.2.0 using mvn package -Pnative,prod
. However, when I try to start it with target/*runner
, there's an error:
'quarkus.oidc.client-id' property must be configured
If I change application.properties
from:
%dev.quarkus.oidc.client-id=web_app
%dev.quarkus.oidc.credentials.secret=web_app
To:
quarkus.oidc.client-id=web_app
quarkus.oidc.credentials.secret=web_app
... it works!
However, the app doesn't start because it can't connect to MySQL and there's no Docker Compose file created for MySQL.
I created https://github.com/jhipster/generator-jhipster-quarkus/issues/251 to track the changes needed for Keycloak and MySQL to run a native image.
I probably missed to remove the dev profile scope from properties. For MySql image compose definition, you can refer to app.yml.
If I try to perform the steps in this demo script (which is based on this blog post) with GraalVM 21.2.0.r11-grl. It seems to work, but running the executable does not work.
If I downgrade to
21.0.0.2.r11-grl
, it works:To Reproduce Steps to reproduce the behavior:
There is a stack trace when building, but it seems like it succeeds:
Expected behavior
I expect that the native image would work, just like it does with 21.0.0.2.r11-grl.
Desktop (please complete the following information):