Replies: 1 comment
-
Lots of different errors - hard to pinpoint without a reproducer. Noclassdeffounderrors normally happen because there are some kind of mismatch of dependencies or some funky error during initialization. If this worked at some point before I would try do a git bisect or similar to locate at what point it started failing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am pretty new to Quarkus and am trying to build a native executable for a project I've recently started working on. I believe the native build used to work, but I suspect some recent changes/upgrades to dependencies have broken it. I've read both https://quarkus.io/guides/building-native-image and https://quarkus.io/guides/writing-native-applications-tips, so have an idea of what should be happening.
In looking through the log output of my build, I see a number of different things that could be problems. It's hard to tell what I should really be focusing on.
First I see this:
[WARNING] [io.quarkus.deployment.steps.ReflectiveHierarchyStep] Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index: - io.vertx.core.Vertx (source: PicocliNativeImageProcessor) - io.vertx.core.http.HttpClient (source: PicocliNativeImageProcessor) - io.vertx.core.http.WebSocket (source: PicocliNativeImageProcessor) - jakarta.enterprise.event.Event (source: PicocliNativeImageProcessor) - jakarta.enterprise.inject.Instance (source: PicocliNativeImageProcessor) - javax.net.ssl.KeyManager (source: PicocliNativeImageProcessor) - javax.net.ssl.SSLContext (source: PicocliNativeImageProcessor) - javax.net.ssl.TrustManager (source: PicocliNativeImageProcessor) - org.bouncycastle.asn1.x500.X500Name (source: PicocliNativeImageProcessor) Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.
Then this:
Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredConstructors for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredMethods for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredFields for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatusBuilder: allDeclaredConstructors for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/AddressableFluent. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatusBuilder: allDeclaredMethods for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/AddressableFluent. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredConstructors for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredMethods for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredFields for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatusBuilder: allDeclaredConstructors for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/AddressableFluent. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatusBuilder: allDeclaredMethods for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/AddressableFluent. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredConstructors for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredMethods for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatus: allDeclaredFields for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/Addressable. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatusBuilder: allDeclaredConstructors for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/AddressableFluent. Warning: Could not register io.fabric8.tekton.triggers.v1beta1.EventListenerStatusBuilder: allDeclaredMethods for reflection. Reason: java.lang.NoClassDefFoundError: io/fabric8/tekton/triggers/internal/knative/pkg/apis/duck/v1beta1/AddressableFluent.
And finally this:
Error: Classes that should be initialized at run time got initialized during image building: io.vertx.core.buffer.impl.VertxByteBufAllocator$1 the class was requested to be initialized at run time (subtype of io.vertx.core.buffer.impl.VertxByteBufAllocator). To see why io.vertx.core.buffer.impl.VertxByteBufAllocator$1 got initialized use --trace-class-initialization=io.vertx.core.buffer.impl.VertxByteBufAllocator$1 io.netty.buffer.UnpooledUnsafeHeapByteBuf the class was requested to be initialized at run time (subtype of io.netty.buffer.AbstractReferenceCountedByteBuf). To see why io.netty.buffer.UnpooledUnsafeHeapByteBuf got initialized use --trace-class-initialization=io.netty.buffer.UnpooledUnsafeHeapByteBuf io.netty.buffer.AbstractReferenceCountedByteBuf the class was requested to be initialized at run time (from 'META-INF/native-image/io.netty/netty-buffer/native-image.properties' in 'file:///project/lib/io.netty.netty-buffer-4.1.87.Final.jar' with 'io.netty.buffer.AbstractReferenceCountedByteBuf'). To see why io.netty.buffer.AbstractReferenceCountedByteBuf got initialized use --trace-class-initialization=io.netty.buffer.AbstractReferenceCountedByteBuf io.vertx.core.buffer.impl.VertxByteBufAllocator the class was requested to be initialized at run time (from feature io.quarkus.runner.Feature.beforeAnalysis with 'VertxByteBufAllocator.class'). To see why io.vertx.core.buffer.impl.VertxByteBufAllocator got initialized use --trace-class-initialization=io.vertx.core.buffer.impl.VertxByteBufAllocator io.vertx.core.buffer.impl.VertxUnsafeHeapByteBuf the class was requested to be initialized at run time (subtype of io.netty.buffer.AbstractReferenceCountedByteBuf). To see why io.vertx.core.buffer.impl.VertxUnsafeHeapByteBuf got initialized use --trace-class-initialization=io.vertx.core.buffer.impl.VertxUnsafeHeapByteBuf io.vertx.core.buffer.impl.VertxByteBufAllocator$2 the class was requested to be initialized at run time (subtype of io.vertx.core.buffer.impl.VertxByteBufAllocator). To see why io.vertx.core.buffer.impl.VertxByteBufAllocator$2 got initialized use --trace-class-initialization=io.vertx.core.buffer.impl.VertxByteBufAllocator$2 io.netty.buffer.ByteBufUtil the class was requested to be initialized at run time (from 'META-INF/native-image/io.netty/netty-buffer/native-image.properties' in 'file:///project/lib/io.netty.netty-buffer-4.1.87.Final.jar' with 'io.netty.buffer.ByteBufUtil' and from feature io.quarkus.runner.Feature.beforeAnalysis with 'ByteBufUtil.class'). To see why io.netty.buffer.ByteBufUtil got initialized use --trace-class-initialization=io.netty.buffer.ByteBufUtil io.netty.buffer.PooledByteBufAllocator the class was requested to be initialized at run time (from 'META-INF/native-image/io.netty/netty-buffer/native-image.properties' in 'file:///project/lib/io.netty.netty-buffer-4.1.87.Final.jar' with 'io.netty.buffer.PooledByteBufAllocator' and from feature io.quarkus.runner.Feature.beforeAnalysis with 'PooledByteBufAllocator.class'). To see why io.netty.buffer.PooledByteBufAllocator got initialized use --trace-class-initialization=io.netty.buffer.PooledByteBufAllocator io.netty.buffer.UnpooledHeapByteBuf the class was requested to be initialized at run time (subtype of io.netty.buffer.AbstractReferenceCountedByteBuf). To see why io.netty.buffer.UnpooledHeapByteBuf got initialized use --trace-class-initialization=io.netty.buffer.UnpooledHeapByteBuf To see how the classes got initialized, use --trace-class-initialization=io.vertx.core.buffer.impl.VertxByteBufAllocator$1,io.netty.buffer.UnpooledUnsafeHeapByteBuf,io.netty.buffer.AbstractReferenceCountedByteBuf,io.vertx.core.buffer.impl.VertxByteBufAllocator,io.vertx.core.buffer.impl.VertxUnsafeHeapByteBuf,io.vertx.core.buffer.impl.VertxByteBufAllocator$2,io.netty.buffer.ByteBufUtil,io.netty.buffer.PooledByteBufAllocator,io.netty.buffer.UnpooledHeapByteBuf com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building: io.vertx.core.buffer.impl.VertxByteBufAllocator$1 the class was requested to be initialized at run time (subtype of io.vertx.core.buffer.impl.VertxByteBufAllocator). To see why io.vertx.core.buffer.impl.VertxByteBufAllocator$1 got initialized use --trace-class-initialization=io.vertx.core.buffer.impl.VertxByteBufAllocator$1 io.netty.buffer.UnpooledUnsafeHeapByteBuf the class was requested to be initialized at run time (subtype of io.netty.buffer.AbstractReferenceCountedByteBuf). To see why io.netty.buffer.UnpooledUnsafeHeapByteBuf got initialized use --trace-class-initialization=io.netty.buffer.UnpooledUnsafeHeapByteBuf io.netty.buffer.AbstractReferenceCountedByteBuf the class was requested to be initialized at run time (from 'META-INF/native-image/io.netty/netty-buffer/native-image.properties' in 'file:///project/lib/io.netty.netty-buffer-4.1.87.Final.jar' with 'io.netty.buffer.AbstractReferenceCountedByteBuf'). To see why io.netty.buffer.AbstractReferenceCountedByteBuf got initialized use --trace-class-initialization=io.netty.buffer.AbstractReferenceCountedByteBuf io.vertx.core.buffer.impl.VertxByteBufAllocator the class was requested to be initialized at run time (from feature io.quarkus.runner.Feature.beforeAnalysis with 'VertxByteBufAllocator.class'). To see why io.vertx.core.buffer.impl.VertxByteBufAllocator got initialized use --trace-class-initialization=io.vertx.core.buffer.impl.VertxByteBufAllocator io.vertx.core.buffer.impl.VertxUnsafeHeapByteBuf the class was requested to be initialized at run time (subtype of io.netty.buffer.AbstractReferenceCountedByteBuf). To see why io.vertx.core.buffer.impl.VertxUnsafeHeapByteBuf got initialized use --trace-class-initialization=io.vertx.core.buffer.impl.VertxUnsafeHeapByteBuf io.vertx.core.buffer.impl.VertxByteBufAllocator$2 the class was requested to be initialized at run time (subtype of io.vertx.core.buffer.impl.VertxByteBufAllocator). To see why io.vertx.core.buffer.impl.VertxByteBufAllocator$2 got initialized use --trace-class-initialization=io.vertx.core.buffer.impl.VertxByteBufAllocator$2 io.netty.buffer.ByteBufUtil the class was requested to be initialized at run time (from 'META-INF/native-image/io.netty/netty-buffer/native-image.properties' in 'file:///project/lib/io.netty.netty-buffer-4.1.87.Final.jar' with 'io.netty.buffer.ByteBufUtil' and from feature io.quarkus.runner.Feature.beforeAnalysis with 'ByteBufUtil.class'). To see why io.netty.buffer.ByteBufUtil got initialized use --trace-class-initialization=io.netty.buffer.ByteBufUtil io.netty.buffer.PooledByteBufAllocator the class was requested to be initialized at run time (from 'META-INF/native-image/io.netty/netty-buffer/native-image.properties' in 'file:///project/lib/io.netty.netty-buffer-4.1.87.Final.jar' with 'io.netty.buffer.PooledByteBufAllocator' and from feature io.quarkus.runner.Feature.beforeAnalysis with 'PooledByteBufAllocator.class'). To see why io.netty.buffer.PooledByteBufAllocator got initialized use --trace-class-initialization=io.netty.buffer.PooledByteBufAllocator io.netty.buffer.UnpooledHeapByteBuf the class was requested to be initialized at run time (subtype of io.netty.buffer.AbstractReferenceCountedByteBuf). To see why io.netty.buffer.UnpooledHeapByteBuf got initialized use --trace-class-initialization=io.netty.buffer.UnpooledHeapByteBuf To see how the classes got initialized, use --trace-class-initialization=io.vertx.core.buffer.impl.VertxByteBufAllocator$1,io.netty.buffer.UnpooledUnsafeHeapByteBuf,io.netty.buffer.AbstractReferenceCountedByteBuf,io.vertx.core.buffer.impl.VertxByteBufAllocator,io.vertx.core.buffer.impl.VertxUnsafeHeapByteBuf,io.vertx.core.buffer.impl.VertxByteBufAllocator$2,io.netty.buffer.ByteBufUtil,io.netty.buffer.PooledByteBufAllocator,io.netty.buffer.UnpooledHeapByteBuf at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:73) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ProvenSafeClassInitializationSupport.checkDelayedInitialization(ProvenSafeClassInitializationSupport.java:273) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:164) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:748) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:85) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:748) at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:162) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:745) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:578) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:535) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:403) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:580) at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
While the first two sections may not be errors, they look like problems to me and I'm not sure that they aren't contributing to the third.
I asked this in Zulip before coming here, and I got this suggestion:
I tried to verify this, and believe I am using the same version. But I'm not 100% sure how to check it.
If the full log would be helpful, I'm happy to attach it.
Thanks,
-- Greg
Beta Was this translation helpful? Give feedback.
All reactions