Reflection registration when building with native-sources
See original GitHub issueDescribe the bug
I’m building quarkus native application in two different ways and one works properly and another one don’t.
Ok
FROM quay.io/quarkus/ubi-quarkus-mandrel:21.3-java11 AS build
...
RUN ./gradlew build -Dquarkus.package.type=native -Dquarkus.native.native-image-xmx=$BUILD_MEMORY
NOK
## Stage 1: build native sources
FROM gradle:7.3-jdk11 AS gradle-build
...
RUN gradle clean build -Dquarkus.package.type=native-sources
## Stage 2: build quarkus-native
FROM quay.io/quarkus/ubi-quarkus-mandrel:21.3-java11 AS native-build
...
RUN native-image $(cat native-image.args) -J-Xmx$BUILD_MEMORY
@cescoffier investigated this and it seems there are missing reflection needed by Kafka - link
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
Clone this
docker-compose up -d
docker logs -f app-ok
docker logs -f app-nok
Output of uname -a
or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (17 by maintainers)
Top Results From Across the Web
Tips for writing native applications - Quarkus
Quarkus makes registration of reflection in an extension a breeze by using ReflectiveClassBuildItem , thus eliminating the need for a JSON configuration file....
Read more >Native Sources | Hitchhikers
Start Building For Free · Start Building For Free. Yext. Sign up. Log in. If you don't have an account, sign up here....
Read more >Release Notes for Red Hat build of Quarkus 2.2
Extension registry for Red Hat build of Quarkus ... QUARKUS-1554 Fix reflections registration of constructors used in serialization.
Read more >Android NDK: Using C/C++ Native Libraries to Write Android ...
If you don't have a build script for your native sources, ... that have been tweaked when creating this project are reflected here,...
Read more >LG NANO75 2021 TV Review - RTINGS.com
The newer model has better reflection handling and a slightly updated user interface, ... LG NANO75 2021 Build quality picture.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No problem!
Very good question! Those are simply mapped to
-H:AdditionalSecurityProviders
on the command line.It seems like the reproducer is using an old Quarkus version that did not include https://github.com/quarkusio/quarkus/pull/21809. Can you try with
2.6.1.Final
? It should fix the problem by also including the proper-H:AdditionalSecurityProviders
on the generated command.