diff --git a/extensions/jsonb/deployment/src/main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java b/extensions/jsonb/deployment/src/main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java index 388c52604ad1c6..f5d90027da006c 100644 --- a/extensions/jsonb/deployment/src/main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java +++ b/extensions/jsonb/deployment/src/main/java/io/quarkus/jsonb/deployment/JsonbProcessor.java @@ -3,6 +3,7 @@ import static org.jboss.jandex.AnnotationTarget.Kind.FIELD; import static org.jboss.jandex.AnnotationTarget.Kind.METHOD; +import java.beans.ConstructorProperties; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -15,6 +16,7 @@ import jakarta.json.bind.annotation.JsonbTypeSerializer; import jakarta.json.bind.serializer.JsonbDeserializer; import jakarta.json.bind.serializer.JsonbSerializer; +import jakarta.json.bind.spi.JsonbProvider; import org.eclipse.yasson.JsonBindingProvider; import org.eclipse.yasson.spi.JsonbComponentInstanceCreator; @@ -71,6 +73,9 @@ void build(BuildProducer reflectiveClass, serviceProvider.produce(new ServiceProviderBuildItem(JsonbComponentInstanceCreator.class.getName(), QuarkusJsonbComponentInstanceCreator.class.getName())); + // Accessed in jakarta.json.bind.spi.JsonbProvider.provider() + serviceProvider.produce(new ServiceProviderBuildItem(JsonbProvider.class.getName())); + // this needs to be registered manually since the runtime module is not indexed by Jandex additionalBeans.produce(new AdditionalBeanBuildItem(JsonbProducer.class)); @@ -91,6 +96,9 @@ void build(BuildProducer reflectiveClass, reflectiveClass.produce( ReflectiveClassBuildItem.builder("java.lang.String").build()); + // register `java.beans.ConstructorProperties` as it's accessed through `io.quarkus.jsonb.JsonbProducer.jsonb` + reflectiveClass.produce(ReflectiveClassBuildItem.builder(ConstructorProperties.class).build()); + // Necessary for Yasson versions using MethodHandles (2.0+) reflectiveMethod.produce(new ReflectiveMethodBuildItem( getClass().getName(),