Open parasjain27031994 opened 1 week ago
/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel)
@parasjain27031994 You need to use --trace-object-instantiation
and perhaps also --trace-class-initialization
to see the chain of what initializes what. Looking at source code also might help. You then mark the relevant classes for runtime initialization, e.g. in application.properties
e.g.
quarkus.native.additional-build-args=\
-H:+UnlockExperimentalVMOptions,\
--initialize-at-run-time=\
some.package.SomeClass1\\,\
some.package.SomeClass2\\,\
some.package.SomeClass3,\
-H:-UnlockExperimentalVMOptions
Give it a shot and tell us if you need any assistance.
@parasjain27031994 you might want to have a look at https://foivos.zakkak.net/tutorials/working-with-randoms-native-images/ (non-Quarkus specific blog post about this issue) as well.
Describe the bug
I have a Quarkus application, that includes dependencies for both AWS and Azure EventHub. Since EventHub extension is not yet available and Azure SDK is GraalVM compatible, while building the native image I am getting following error
The initial error was different and related to a conflict with reactor netty, so based on https://github.com/quarkusio/quarkus/issues/26879 I made following adjustments in my POM
I also defined below native image args
However, after making the change, it is now throwing the above error.
Expected behavior
The native image build should succeed.
Actual behavior
THe native build fails
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
graalvm-jdk-21+35.1
Mandrel or GraalVM version (if different from Java)
23.1.3.1-Final
Quarkus version or git rev
3.11.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Additional information
No response