diff --git a/extensions/jdbc/jdbc-db2/deployment/src/main/java/io/quarkus/jdbc/db2/deployment/JDBCDB2Processor.java b/extensions/jdbc/jdbc-db2/deployment/src/main/java/io/quarkus/jdbc/db2/deployment/JDBCDB2Processor.java index fd03be59a5aeda..107b700ca788b2 100644 --- a/extensions/jdbc/jdbc-db2/deployment/src/main/java/io/quarkus/jdbc/db2/deployment/JDBCDB2Processor.java +++ b/extensions/jdbc/jdbc-db2/deployment/src/main/java/io/quarkus/jdbc/db2/deployment/JDBCDB2Processor.java @@ -1,5 +1,15 @@ package io.quarkus.jdbc.db2.deployment; +import com.ibm.db2.jcc.resources.ResourceKeys; +import com.ibm.db2.jcc.resources.Resources; +import com.ibm.db2.jcc.resources.SqljResources; +import com.ibm.db2.jcc.resources.T2uResourceKeys; +import com.ibm.db2.jcc.resources.T2uResources; +import com.ibm.db2.jcc.resources.T2zResourceKeys; +import com.ibm.db2.jcc.resources.T2zResources; +import com.ibm.db2.jcc.resources.T4ResourceKeys; +import com.ibm.db2.jcc.resources.T4Resources; + import io.quarkus.agroal.spi.JdbcDriverBuildItem; import io.quarkus.arc.deployment.AdditionalBeanBuildItem; import io.quarkus.arc.processor.BuiltinScope; @@ -55,12 +65,23 @@ void configureAgroalConnection(BuildProducer additional } @BuildStep - void registerDriverForReflection(BuildProducer reflectiveClass) { + void registerForReflection(BuildProducer reflectiveClass) { //Not strictly necessary when using Agroal, as it also registers //any JDBC driver being configured explicitly through its configuration. //We register it for the sake of people not using Agroal, //for example when the driver is used with OpenTelemetry JDBC instrumentation. reflectiveClass.produce(ReflectiveClassBuildItem.builder(DB2_DRIVER_CLASS).build()); + + // register resource bundles for reflection (they are apparently classes...) + reflectiveClass.produce(ReflectiveClassBuildItem.builder(Resources.class).build()); + reflectiveClass.produce(ReflectiveClassBuildItem.builder(ResourceKeys.class).build()); + reflectiveClass.produce(ReflectiveClassBuildItem.builder(SqljResources.class).build()); + reflectiveClass.produce(ReflectiveClassBuildItem.builder(T2uResourceKeys.class).build()); + reflectiveClass.produce(ReflectiveClassBuildItem.builder(T2uResources.class).build()); + reflectiveClass.produce(ReflectiveClassBuildItem.builder(T2zResourceKeys.class).build()); + reflectiveClass.produce(ReflectiveClassBuildItem.builder(T2zResources.class).build()); + reflectiveClass.produce(ReflectiveClassBuildItem.builder(T4ResourceKeys.class).build()); + reflectiveClass.produce(ReflectiveClassBuildItem.builder(T4Resources.class).build()); } @BuildStep