Unable to build graalvm native image for a micronaut app #6641
-
Issue descriptionMicronaut version is 2.3.2 and app is built on java Getting following error when app is being compiled into graalvm native executable Warning: class initialization of class io.micronaut.tracing.brave.instrument.http.BraveTracingServerFilter failed with exception java.lang.NoClassDefFoundError: brave/http/HttpServerRequest. This class will be initialized at run time because option --allow-incomplete-classpath is used for image building. Use the option --initialize-at-run-time=io.micronaut.tracing.brave.instrument.http.BraveTracingServerFilter to explicitly request delayed initialization of this class. Warning: class initialization of class io.micronaut.tracing.brave.instrument.http.HttpClientTracingPublisher failed with exception java.lang.NoClassDefFoundError: brave/http/HttpClientResponse. This class will be initialized at run time because option --allow-incomplete-classpath is used for image building. Use the option --initialize-at-run-time=io.micronaut.tracing.brave.instrument.http.HttpClientTracingPublisher to explicitly request delayed initialization of this class. Is it the right fix to add this option to fix these ? if true, Please clarify why these needed to be intialized in runtime |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Those are warnings and not errors. There is nothing in those logs that stop you from building a native image. It seems that you are using Zipkin, right? We support Zipkin and GraalVM for a long time. If it's not working for you, please try with a new version of Micronaut and GraalVM. |
Beta Was this translation helpful? Give feedback.
Those are warnings and not errors. There is nothing in those logs that stop you from building a native image.
It seems that you are using Zipkin, right? We support Zipkin and GraalVM for a long time. If it's not working for you, please try with a new version of Micronaut and GraalVM.