diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index 53fdddfcf0dc0..e8b43a7549a1d 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -62,7 +62,7 @@
1.0.13
3.0.1
3.13.1
- 4.21.0
+ 4.22.0
2.6.0
2.1.3
3.0.0
@@ -215,7 +215,7 @@
2.12.1
0.8.11
1.1.0
- 3.0.0
+ 3.3.0
2.12.3
0.16.0
diff --git a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java
index 26269416f743c..021642151f1d9 100644
--- a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java
+++ b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java
@@ -15,6 +15,7 @@
import org.objectweb.asm.Opcodes;
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
+import io.quarkus.bootstrap.classloading.QuarkusClassLoader;
import io.quarkus.deployment.Feature;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
@@ -166,14 +167,13 @@ public NativeImageConfigBuildItem pulsarRuntimeInitialized(
.constructors().build());
}
- return NativeImageConfigBuildItem.builder()
+ NativeImageConfigBuildItem.Builder nativeImageConfig = NativeImageConfigBuildItem.builder()
.addNativeImageSystemProperty("io.netty.handler.ssl.noOpenSsl", "true")
.addRuntimeInitializedClass("org.apache.pulsar.common.allocator.PulsarByteBufAllocator")
.addRuntimeInitializedClass("org.apache.pulsar.common.protocol.Commands")
.addRuntimeInitializedClass("org.apache.pulsar.client.impl.auth.oauth2.protocol.TokenClient")
.addRuntimeInitializedClass("org.apache.pulsar.client.impl.crypto.MessageCryptoBc")
.addRuntimeInitializedClass("org.apache.pulsar.client.impl.schema.generic.GenericProtobufNativeSchema")
- .addRuntimeInitializedClass("org.apache.pulsar.client.impl.Backoff")
.addRuntimeInitializedClass("org.apache.pulsar.client.impl.ConnectionPool")
.addRuntimeInitializedClass("org.apache.pulsar.client.impl.ControlledClusterFailover")
.addRuntimeInitializedClass("org.apache.pulsar.client.impl.HttpClient")
@@ -188,8 +188,17 @@ public NativeImageConfigBuildItem pulsarRuntimeInitialized(
.addRuntimeInitializedClass("org.asynchttpclient.RequestBuilder")
.addRuntimeInitializedClass("org.asynchttpclient.BoundRequestBuilder")
.addRuntimeInitializedClass("org.asynchttpclient.ntlm.NtlmEngine")
- .addRuntimeInitializedClass("sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher")
- .build();
+ .addRuntimeInitializedClass("sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher");
+ if (QuarkusClassLoader.isClassPresentAtRuntime("org.apache.pulsar.common.util.Backoff")) {
+ nativeImageConfig
+ .addRuntimeInitializedClass("org.apache.pulsar.common.util.Backoff");
+ }
+ if (QuarkusClassLoader.isClassPresentAtRuntime("org.apache.pulsar.client.impl.Backoff")) {
+ nativeImageConfig
+ .addRuntimeInitializedClass("org.apache.pulsar.client.impl.Backoff");
+ }
+
+ return nativeImageConfig.build();
}
}