-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Compilation fails when using reflection-config in quarkus 1.6.x #11184
Comments
On Linux, I could not reproduce either when building the native binary either with docker or without |
There have been similar issues reported previously for native image build on Windows with Docker. Do any of the suggestions in this other issue #6259 help? Having said that I can't say why it was working fine in versions lesser than 1.6.x of Quarkus. |
The closest thing that I can remember to this, is this change #5458 but that happened in 1.1.x days, so not sure if that's related to the issue you are seeing. |
Thanks for reply. I will have a deeper look and try to reproduce it there. On additional info - when I don't mention the json file the package builds. So the runner.jar is mounted correctly into the container and native image is build. |
I have this same issue with Windows 10 and quarkus versions 1.6.0 and later. Works with quarkus 1.5.2 and on Ubuntu with WSL2 with all Quarkus versions (in my case the file is resources-config.json that is not found) |
Hello @tapaniantonrundgren, is it with a (docker) container build of native-image (using |
It is with container build. Need to build Linux images |
I've opened #11649 with a potential fix. If anyone of you can verify that change works for you, that would be great. This doc might help https://github.com/quarkusio/quarkus/blob/master/CONTRIBUTING.md#checking-an-issue-is-fixed-in-master (just use my PR branch instead of master) |
Used the latest 999-SNAPSHOT and yes, the native container build now works on Windows 10 too |
Hi, due to proxy restrictions I am unable to test the SNAPSHOT release, but I can confirm that the problem is solved in version 1.7.2.Final for me. Thanks a lot for analysing and fixing |
Thank you both for confirming the fix. |
I am using 1.9.1.Final and i still have that error. Here is my config
this won't build and give the error:
Previously, to be able to build, i would have only this config
That conf build a native image no problem. BUT, it will fail at runtime cause of some google cloud API library.
Thats why i am trying to configure the native image differently with all those flags as seen here: oracle/graal#926 But i just can't build a native image with that fix. |
unfortunately, i have also similar problem on Quarkus 1.11.1.Final version. i'm trying to build Quarkus app as native. But i'm getting following errors.
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.3.3.0-Final (Mandrel Distribution) (Java Version 11.0.12+7)[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v //doc-builder/target/fqcs-doc-builder-1.3.4-SNAPSHOT-native-image-source-jar:/project:z --env LANG=C --rm quay.io/quarkus/ubi-quarkus-mandrel:20.3-java11 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Dfile.encoding=UTF-8 --initialize-at-run-time=org.apache.pdfbox.pdmodel.encryption.PublicKeySecurityHandler -H:+RemoveSaturatedTypeFlows -H:ResourceConfigurationFiles=resource-config.json -H:ReflectionConfigurationFiles=reflect-config.json --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar doc-builder-1.3.4-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -J-Xmx10g -H:-AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services -H:-UseServiceLoaderFeature -H:+StackTrace doc-builder-1.3.4-SNAPSHOT-runner i've put files on https://github.com/danfickle/openhtmltopdf-native/tree/main/src/main/resources/META-INF/native-image (resources) under src/main/resources and src/main/resources/META-INF/native-image. But somehow does not work.. |
Hi, I'm currently facing a strange problem when using quarkus 1.6.x
Describe the bug
I have a utility jar with lots of enums that I need to mention in a reflection config json file, as mentioned https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection
in my application.properties I have the line
quarkus.native.additional-build-args =-H:ReflectionConfigurationFiles=reflection-config.json
The file 'reflection-config.json' is located in src/main/resources
Issue appears when trying to create a native executable. It does not matter if I use the docker container or a local installed graalvm.
Expected behavior
Expectation is that the application compiles.
Actual behavior
The compilation failes with the following error
when using my local graalvm I get the same exception, only the path is different of the path that cannot be found
To Reproduce
Steps to reproduce the behavior:
Configuration
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
:Microsoft Windows [Version 10.0.18362.592]
java -version
:1.6.1.Final
mvnw --version
orgradlew --version
):Additional context
The application compiles without any problem when using quarkus < 1.6.x
The text was updated successfully, but these errors were encountered: