Skip to content

Commit

Permalink
Include RowSet properties file in native image
Browse files Browse the repository at this point in the history
This fixes the `Resource javax/sql/rowset/rowset.properties not found` error
  • Loading branch information
gastaldi committed Jan 24, 2024
1 parent 71f3200 commit 131a122
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,14 @@ void adaptOpenTelemetryJdbcInstrumentationForNative(BuildProducer<RemovedResourc
}

@BuildStep
NativeImageResourceBundleBuildItem registerRowSetResourceBundle() {
return new NativeImageResourceBundleBuildItem("com.sun.rowset.RowSetResourceBundle");
void registerRowSetSupport(
BuildProducer<NativeImageResourceBundleBuildItem> resourceBundleProducer,
BuildProducer<NativeImageResourceBuildItem> nativeResourceProducer,
BuildProducer<ReflectiveClassBuildItem> reflectiveClassProducer) {
resourceBundleProducer.produce(new NativeImageResourceBundleBuildItem("com.sun.rowset.RowSetResourceBundle"));
nativeResourceProducer.produce(new NativeImageResourceBuildItem("javax/sql/rowset/rowset.properties"));
reflectiveClassProducer.produce(ReflectiveClassBuildItem.builder(
"com.sun.rowset.providers.RIOptimisticProvider",
"com.sun.rowset.providers.RIXMLProvider").build());
}
}

0 comments on commit 131a122

Please sign in to comment.