Skip to content

Commit

Permalink
Merge pull request quarkusio#21886 from zakkak/fix-db2-jdbc-java17
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi authored Dec 2, 2021
2 parents 57e0fa7 + 1f75f78 commit e2482f4
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.NativeImageEnableAllCharsetsBuildItem;
import io.quarkus.deployment.builditem.SslNativeConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.JPMSExportBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.jdbc.db2.runtime.DB2AgroalConnectionConfigurer;
Expand Down Expand Up @@ -77,4 +78,12 @@ void registerServiceBinding(Capabilities capabilities,
}
dbKind.produce(new DefaultDataSourceDbKindBuildItem(DatabaseKind.DB2));
}

@BuildStep
void addBouncyCastleExportsToNativeImage(BuildProducer<JPMSExportBuildItem> jpmsExports) {
// com.ibm.db2:jcc:11.5.6.0 accesses sun.security.action.GetPropertyAction
// which is strongly encapsulated in Java 17 requiring
// --add-exports=java.base/sun.security.action=ALL-UNNAMED
jpmsExports.produce(new JPMSExportBuildItem("java.base", "sun.security.action"));
}
}

0 comments on commit e2482f4

Please sign in to comment.