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
Unable to load the config property type: [Ljava.lang.String through native image #5297
Comments
@fdelbrayelle you are using a fairly old (in the supersonic Quarkus sense :)). I tried this this with the latest Quarkus version and couldn't reproduce it and therefore I'm going to close this. Thanks |
@geoand In fact I've made a typo in the original issue. The code to reproduce it is:
And not:
Reproduced in version 1.0.0.CR1 as well. |
As you closed the issue I'm not allowed to re-open it. Feel free to do it if you want :) |
I'll reopen and check it out soon |
I think I know what the issue is just by looking at the array, but I'm traveling so won't be able to fix for a few hours (or maybe over the weekend) |
Fixed (hopefully :)) by #5321. |
Thank you! Why this issue is only with the native image? |
It's because Class.forName needs to have reflection enabled on the "target" class for it to work in native mode. |
Ensure that array config values are properly validated at startup
The application is running in error when launching a native image of an application getting a config property as a String[] :
This bug is not reproduced when launching the application without the native image with
mvn clean compile quarkus:dev
.application.properties :
partners.available=ABC,DEF
PartnerService.java :
Updating the availablePartners from String[] to List solve the problem.
Any idea why it is not working through the native image running?
Steps to reproduce the behavior:
docker run -v $PWD:/sources --workdir=/sources -v $HOME/.m2/repository:/home/quarkus/.m2/repository -it centos-quarkus-maven:19.2.1 mvn -Pnative package
./target/application.runner
Environment :
uname -r
: 5.0.0-32-genericjava -version
: openjdk version "1.8.0_222"Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: