You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UCP integration needs native image configuration.
Specifically, it needs (in src/main/resources/META-INF/native-image/com.oracle.database.jdbc/ucp/native-image.properties (following the documented resource layout convention):
# (Ideally the ucp stuff would be in the UCP codebase itself.)# The reflection configuration is just to indicate the need; Helidon seems to have# varying ways of including this information and I'm not sure which is preferred. The # following certainly works following native image's documentation and involves no# special Helidon sauce or magic.Args=--initialize-at-build-time=oracle.ucp.logging.annotations \
-H:ReflectionConfigurationResources=${.}/reflect-config.json
# Works around a native image builder bug that causes the Feature present in the required# Oracle database driver (required even if you don't use it, because UCP is tightly coupled# to it) to crash in certain cases with an IllegalAccessError. Ideally the Feature would# be fixed, or this option would be present in the Oracle database driver jar.JavaArgs=--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.configure=ALL-UNNAMED
And therefore it also needs, at a minimum (in src/main/resources/META-INF/native-image/com.oracle.database.jdbc/ucp/reflect-config.json or similar depending on Helidon convention):
This is because the JDBC specification mandates Java Beans-style reflective configuration for DataSource implementations.
Then it needs src/main/resources/META-INF/helidon/native-image/weld-proxies.json, apparently, with exactly these contents (i.e. even though, for example, PoolDataSourceImpl.class is among the bean types of PoolDataSourceImpl.class, for some reason it must not appear in the ifaces array, and because the beans are added synthetically the bean class is the class of the portable extension adding them):
Any given application, of course, must also configure their preferred driver for reflection as well but that kind of information does not belong here, I don't think, even though we could guard some of it with the conditional reachability constructs offered by the schema.
The UCP integration needs native image configuration.
Specifically, it needs (in
src/main/resources/META-INF/native-image/com.oracle.database.jdbc/ucp/native-image.properties
(following the documented resource layout convention):And therefore it also needs, at a minimum (in
src/main/resources/META-INF/native-image/com.oracle.database.jdbc/ucp/reflect-config.json
or similar depending on Helidon convention):This is because the JDBC specification mandates Java Beans-style reflective configuration for
DataSource
implementations.Then it needs
src/main/resources/META-INF/helidon/native-image/weld-proxies.json
, apparently, with exactly these contents (i.e. even though, for example,PoolDataSourceImpl.class
is among the bean types ofPoolDataSourceImpl.class
, for some reason it must not appear in theifaces
array, and because the beans are added synthetically the bean class is the class of the portable extension adding them):Any given application, of course, must also configure their preferred driver for reflection as well but that kind of information does not belong here, I don't think, even though we could guard some of it with the conditional reachability constructs offered by the schema.
See also #8199.
The text was updated successfully, but these errors were encountered: