diff --git a/bson/src/main/resources/META-INF/native-image/org.mongodb/bson/native-image.properties b/bson/src/main/resources/META-INF/native-image/native-image.properties similarity index 100% rename from bson/src/main/resources/META-INF/native-image/org.mongodb/bson/native-image.properties rename to bson/src/main/resources/META-INF/native-image/native-image.properties diff --git a/bson/src/main/resources/META-INF/native-image/reflect-config.json b/bson/src/main/resources/META-INF/native-image/reflect-config.json new file mode 100644 index 00000000000..dd27feda44d --- /dev/null +++ b/bson/src/main/resources/META-INF/native-image/reflect-config.json @@ -0,0 +1,17 @@ +[ +{ + "name":"java.lang.Object", + "queryAllDeclaredMethods":true +}, +{ + "name":"sun.security.provider.NativePRNG", + "methods":[{"name":"","parameterTypes":[] }, {"name":"","parameterTypes":["java.security.SecureRandomParameters"] }] +}, +{ + "name":"sun.security.provider.SHA", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"org.slf4j.Logger" +} +] diff --git a/build.gradle b/build.gradle index 543e6de19ce..d9ebd912fb8 100644 --- a/build.gradle +++ b/build.gradle @@ -58,6 +58,7 @@ ext { projectReactorVersion = '2022.0.0' junitBomVersion = '5.10.2' logbackVersion = '1.3.14' + graalSdkVersion = '24.0.0' gitVersion = getGitVersion() } diff --git a/driver-core/build.gradle b/driver-core/build.gradle index 78ab607cc23..72cd74104f5 100644 --- a/driver-core/build.gradle +++ b/driver-core/build.gradle @@ -46,6 +46,7 @@ dependencies { api "io.netty:netty-buffer", optional api "io.netty:netty-transport", optional api "io.netty:netty-handler", optional + compileOnly "org.graalvm.sdk:graal-sdk:$graalSdkVersion" // Optionally depend on both AWS SDK v2 and v1. The driver will use v2 is present, v1 if present, or built-in functionality if // neither are present diff --git a/driver-core/src/main/com/mongodb/UnixServerAddress.java b/driver-core/src/main/com/mongodb/UnixServerAddress.java index bba882de794..8bd42052004 100644 --- a/driver-core/src/main/com/mongodb/UnixServerAddress.java +++ b/driver-core/src/main/com/mongodb/UnixServerAddress.java @@ -17,12 +17,14 @@ package com.mongodb; import com.mongodb.annotations.Immutable; +import com.mongodb.internal.graalvm.substitution.UnixServerAddressSubstitution; import static com.mongodb.assertions.Assertions.isTrueArgument; import static com.mongodb.assertions.Assertions.notNull; /** * Represents the location of a MongoD unix domain socket. + * It is {@linkplain UnixServerAddressSubstitution not supported in GraalVM native image}. * *

Requires the 'jnr.unixsocket' library.

* @since 3.7 @@ -34,10 +36,18 @@ public final class UnixServerAddress extends ServerAddress { /** * Creates a new instance * @param path the path of the MongoD unix domain socket. + * @throws UnsupportedOperationException If {@linkplain UnixServerAddressSubstitution called in a GraalVM native image}. */ public UnixServerAddress(final String path) { super(notNull("The path cannot be null", path)); isTrueArgument("The path must end in .sock", path.endsWith(".sock")); + checkNotInGraalVmNativeImage(); + } + + /** + * @throws UnsupportedOperationException If {@linkplain UnixServerAddressSubstitution called in a GraalVM native image}. + */ + private static void checkNotInGraalVmNativeImage() { } @Override diff --git a/driver-core/src/main/com/mongodb/internal/dns/JndiDnsClient.java b/driver-core/src/main/com/mongodb/internal/dns/JndiDnsClient.java index a1e95cac68a..71df713fb8b 100644 --- a/driver-core/src/main/com/mongodb/internal/dns/JndiDnsClient.java +++ b/driver-core/src/main/com/mongodb/internal/dns/JndiDnsClient.java @@ -32,7 +32,10 @@ import java.util.Hashtable; import java.util.List; -final class JndiDnsClient implements DnsClient { +/** + *

This class is not part of the public API and may be removed or changed at any time

+ */ +public final class JndiDnsClient implements DnsClient { @Override public List getResourceRecordData(final String name, final String type) throws DnsException { diff --git a/driver-core/src/main/com/mongodb/internal/graalvm/substitution/UnixServerAddressSubstitution.java b/driver-core/src/main/com/mongodb/internal/graalvm/substitution/UnixServerAddressSubstitution.java new file mode 100644 index 00000000000..9d52c730c1b --- /dev/null +++ b/driver-core/src/main/com/mongodb/internal/graalvm/substitution/UnixServerAddressSubstitution.java @@ -0,0 +1,31 @@ +/* + * Copyright 2008-present MongoDB, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.mongodb.internal.graalvm.substitution; + +import com.mongodb.UnixServerAddress; +import com.oracle.svm.core.annotate.Substitute; +import com.oracle.svm.core.annotate.TargetClass; + +@TargetClass(UnixServerAddress.class) +public final class UnixServerAddressSubstitution { + @Substitute + private static void checkNotInGraalVmNativeImage() { + throw new UnsupportedOperationException("UnixServerAddress is not supported in GraalVM native image"); + } + + private UnixServerAddressSubstitution() { + } +} diff --git a/driver-core/src/main/resources/META-INF/native-image/org.mongodb/bson/native-image.properties b/driver-core/src/main/resources/META-INF/native-image/native-image.properties similarity index 87% rename from driver-core/src/main/resources/META-INF/native-image/org.mongodb/bson/native-image.properties rename to driver-core/src/main/resources/META-INF/native-image/native-image.properties index 74579722773..49541a06e0e 100644 --- a/driver-core/src/main/resources/META-INF/native-image/org.mongodb/bson/native-image.properties +++ b/driver-core/src/main/resources/META-INF/native-image/native-image.properties @@ -18,4 +18,5 @@ Args =\ com.mongodb.UnixServerAddress,\ com.mongodb.internal.connection.SnappyCompressor,\ com.mongodb.internal.connection.ClientMetadataHelper,\ - com.mongodb.internal.connection.ServerAddressHelper + com.mongodb.internal.connection.ServerAddressHelper,\ + com.mongodb.internal.dns.DefaultDnsResolver diff --git a/driver-core/src/main/resources/META-INF/native-image/reflect-config.json b/driver-core/src/main/resources/META-INF/native-image/reflect-config.json new file mode 100644 index 00000000000..9a89dbe1e1f --- /dev/null +++ b/driver-core/src/main/resources/META-INF/native-image/reflect-config.json @@ -0,0 +1,83 @@ +[ +{ + "name":"com.mongodb.BasicDBObject", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.mongodb.MongoNamespace", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "name":"com.mongodb.WriteConcern", + "allPublicFields":true +}, +{ + "name":"com.mongodb.client.model.changestream.ChangeStreamDocument", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true, + "methods":[{"name":"","parameterTypes":["java.lang.String","org.bson.BsonDocument","org.bson.BsonDocument","org.bson.BsonDocument","java.lang.Object","java.lang.Object","org.bson.BsonDocument","org.bson.BsonTimestamp","com.mongodb.client.model.changestream.UpdateDescription","org.bson.BsonInt64","org.bson.BsonDocument","org.bson.BsonDateTime","com.mongodb.client.model.changestream.SplitEvent","org.bson.BsonDocument"] }] +}, +{ + "name":"com.mongodb.client.model.changestream.SplitEvent", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "name":"com.mongodb.client.model.changestream.TruncatedArray", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "name":"com.mongodb.client.model.changestream.UpdateDescription", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true, + "methods":[{"name":"","parameterTypes":["java.util.List","org.bson.BsonDocument","java.util.List","org.bson.BsonDocument"] }] +}, +{ + "name":"java.lang.Record" +}, +{ + "name":"java.lang.Thread", + "fields":[{"name":"threadLocalRandomProbe"}] +}, +{ + "name":"java.net.Socket", + "methods":[{"name":"setOption","parameterTypes":["java.net.SocketOption","java.lang.Object"] }] +}, +{ + "name":"java.security.SecureRandomParameters" +}, +{ + "name":"java.util.concurrent.ForkJoinTask", + "fields":[{"name":"aux"}, {"name":"status"}] +}, +{ + "name":"java.util.concurrent.atomic.Striped64", + "fields":[{"name":"base"}, {"name":"cellsBusy"}] +}, +{ + "name":"jdk.internal.misc.Unsafe" +}, +{ + "name":"jdk.net.ExtendedSocketOptions", + "fields":[{"name":"TCP_KEEPCOUNT"}, {"name":"TCP_KEEPIDLE"}, {"name":"TCP_KEEPINTERVAL"}] +}, +{ + "name":"org.bson.codecs.kotlin.DataClassCodecProvider" +}, +{ + "name":"org.bson.codecs.kotlinx.KotlinSerializerCodecProvider" +}, +{ + "name":"org.bson.codecs.record.RecordCodecProvider" +}, +{ + "name":"org.slf4j.Logger" +} +] diff --git a/driver-core/src/main/resources/META-INF/native-image/resource-config.json b/driver-core/src/main/resources/META-INF/native-image/resource-config.json index 8c008c9938d..43d3d5bb969 100644 --- a/driver-core/src/main/resources/META-INF/native-image/resource-config.json +++ b/driver-core/src/main/resources/META-INF/native-image/resource-config.json @@ -1,6 +1,8 @@ { "resources":{ "includes":[{ + "pattern":"\\QMETA-INF/services/com.mongodb.spi.dns.DnsClientProvider\\E" + }, { "pattern":"\\QMETA-INF/services/com.mongodb.spi.dns.InetAddressResolverProvider\\E" }]}, "bundles":[] diff --git a/graalvm-native-image-app/build.gradle b/graalvm-native-image-app/build.gradle index d6bc5a7b6cb..713b8c29a1a 100644 --- a/graalvm-native-image-app/build.gradle +++ b/graalvm-native-image-app/build.gradle @@ -40,9 +40,31 @@ graalvmNative { // The same is true about executing the `metadataCopy` Gradle task. // This may be a manifestation of an issue with the `org.graalvm.buildtools.native` plugin. enabled = false - defaultMode = 'standard' + defaultMode = 'direct' + def taskExecutedWithAgentAttached = 'run' + modes { + direct { + // see https://www.graalvm.org/latest/reference-manual/native-image/metadata/ExperimentalAgentOptions + options.add("config-output-dir=$buildDir/native/agent-output/$taskExecutedWithAgentAttached") + // `experimental-configuration-with-origins` produces + // `graalvm-native-image-app/build/native/agent-output/run/reflect-origins.txt` + // and similar files that explain the origin of each of the reachability metadata piece. + // However, for some reason, the actual reachability metadata is not generated when this option is enabled, + // so enable it manually if you need an explanation for a specific reachability metadata entry, + // and expect the build to fail. + // options.add('experimental-configuration-with-origins') + + // `experimental-class-define-support` does not seem to do what it is supposed to do. + // We need this option to work if we want to support `UnixServerAddress` in native image. + // Unfortunately, the tracing agent neither generates the metadata in + // `graalvm-native-image-app/src/main/resources/META-INF/native-image/proxy-config.json`, + // nor does it extract the bytecode of the generated classes to + // `graalvm-native-image-app/src/main/resources/META-INF/native-image/agent-extracted-predefined-classes`. + options.add('experimental-class-define-support') + } + } metadataCopy { - inputTaskNames.add('run') + inputTaskNames.add(taskExecutedWithAgentAttached) outputDirectories.add('src/main/resources/META-INF/native-image') mergeWithExisting = false } @@ -93,4 +115,5 @@ dependencies { implementation "ch.qos.logback:logback-classic:$logbackVersion" implementation platform("io.projectreactor:reactor-bom:$projectReactorVersion") implementation 'io.projectreactor:reactor-core' + implementation "org.graalvm.sdk:nativeimage:$graalSdkVersion" } diff --git a/graalvm-native-image-app/readme.md b/graalvm-native-image-app/readme.md index bb974fdd063..a659b7d1c07 100644 --- a/graalvm-native-image-app/readme.md +++ b/graalvm-native-image-app/readme.md @@ -47,12 +47,12 @@ you need to inform Gradle about that location as specified in https://docs.gradl Assuming that your MongoDB deployment is accessible at `mongodb://localhost:27017`, run from the driver project root directory: -| # | Command | Description | -|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| -| 0 | `env JAVA_HOME="${JDK17}" ./gradlew -PjavaVersion=21 :graalvm-native-image-app:nativeCompile` | Build the application relying on the reachability metadata stored in `graalvm-native-image-app/src/main/resources/META-INF/native-image`. | -| 1 | `env JAVA_HOME="${JDK17}" ./gradlew :graalvm-native-image-app:clean && env JAVA_HOME=${JDK21_GRAALVM} ./gradlew -PjavaVersion=21 -Pagent :graalvm-native-image-app:run && env JAVA_HOME=${JDK21_GRAALVM} ./gradlew :graalvm-native-image-app:metadataCopy` | Collect the reachability metadata and update the files storing it. Do this before building the application only if building fails otherwise. | -| 2 | `./graalvm-native-image-app/build/native/nativeCompile/NativeImageApp` | Run the application that has been built. | -| 3 | `env JAVA_HOME="${JDK17}" ./gradlew -PjavaVersion=21 :graalvm-native-image-app:nativeRun` | Run the application using Gradle, build it if necessary relying on the stored reachability metadata. | +| # | Command | Description | +|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| 0 | `env JAVA_HOME="${JDK17}" ./gradlew -PjavaVersion=21 :graalvm-native-image-app:nativeCompile` | Build the application relying on the reachability metadata stored in `graalvm-native-image-app/src/main/resources/META-INF/native-image`. | +| 1 | `env JAVA_HOME="${JDK17}" ./gradlew clean && env JAVA_HOME=${JDK21_GRAALVM} ./gradlew -PjavaVersion=21 -Pagent :graalvm-native-image-app:run && env JAVA_HOME=${JDK21_GRAALVM} ./gradlew :graalvm-native-image-app:metadataCopy` | Collect the reachability metadata and update the files storing it. Do this before building the application only if building fails otherwise. | +| 2 | `./graalvm-native-image-app/build/native/nativeCompile/NativeImageApp` | Run the application that has been built. | +| 3 | `env JAVA_HOME="${JDK17}" ./gradlew -PjavaVersion=21 :graalvm-native-image-app:nativeRun` | Run the application using Gradle, build it if necessary relying on the stored reachability metadata. | #### Specifying a custom connection string diff --git a/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/CustomDnsClientProvider.java b/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/CustomDnsClientProvider.java new file mode 100644 index 00000000000..696d37becd0 --- /dev/null +++ b/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/CustomDnsClientProvider.java @@ -0,0 +1,61 @@ +/* + * Copyright 2008-present MongoDB, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.mongodb.internal.graalvm; + +import com.mongodb.internal.dns.JndiDnsClient; +import com.mongodb.spi.dns.DnsClient; +import com.mongodb.spi.dns.DnsClientProvider; +import com.mongodb.spi.dns.DnsException; + +import java.util.List; + +import static java.lang.String.format; + +public final class CustomDnsClientProvider implements DnsClientProvider { + private static volatile boolean used = false; + + public CustomDnsClientProvider() { + } + + @Override + public DnsClient create() { + return new CustomDnsClient(); + } + + static void assertUsed() throws AssertionError { + if (!used) { + throw new AssertionError(format("%s is not used", CustomDnsClientProvider.class.getSimpleName())); + } + } + + private static void markUsed() { + used = true; + } + + private static final class CustomDnsClient implements DnsClient { + private final JndiDnsClient wrapped; + + CustomDnsClient() { + wrapped = new JndiDnsClient(); + } + + @Override + public List getResourceRecordData(final String name, final String type) throws DnsException { + markUsed(); + return wrapped.getResourceRecordData(name, type); + } + } +} diff --git a/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/DnsSpi.java b/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/DnsSpi.java index acfbb624629..e1d6ad72bfd 100644 --- a/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/DnsSpi.java +++ b/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/DnsSpi.java @@ -15,23 +15,52 @@ */ package com.mongodb.internal.graalvm; +import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoClients; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; +import java.util.concurrent.TimeUnit; final class DnsSpi { private static final Logger LOGGER = LoggerFactory.getLogger(DnsSpi.class); public static void main(final String... args) { - LOGGER.info("Begin"); + useInetAddressResolverProvider(args); + useDnsClientProvider(); + } + + private static void useInetAddressResolverProvider(final String... args) { try (MongoClient client = args.length == 0 ? MongoClients.create() : MongoClients.create(args[0])) { - LOGGER.info("Database names: {}", client.listDatabaseNames().into(new ArrayList<>())); + ArrayList databaseNames = client.listDatabaseNames().into(new ArrayList<>()); + LOGGER.info("Database names: {}", databaseNames); } CustomInetAddressResolverProvider.assertUsed(); - LOGGER.info("End"); + } + + private static void useDnsClientProvider() { + try (MongoClient client = MongoClients.create(MongoClientSettings.builder() + .applyToClusterSettings(builder -> builder + .srvHost("a.b.c") + // `MongoClient` uses `CustomDnsClientProvider` asynchronously, + // and by waiting for server selection that cannot succeed due to `a.b.c` not resolving to an IP address, + // we give `MongoClient` enough time to use `CustomDnsClientProvider`. + // This is a tolerable race condition for a test. + .serverSelectionTimeout(2, TimeUnit.SECONDS)) + .build())) { + ArrayList databaseNames = client.listDatabaseNames().into(new ArrayList<>()); + LOGGER.info("Database names: {}", databaseNames); + } catch (RuntimeException e) { + try { + CustomDnsClientProvider.assertUsed(); + } catch (AssertionError err) { + err.addSuppressed(e); + throw err; + } + // an exception is expected because `a.b.c` does not resolve to an IP address + } } private DnsSpi() { diff --git a/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/NativeImageApp.java b/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/NativeImageApp.java index 6c42ff21df3..59778d7686f 100644 --- a/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/NativeImageApp.java +++ b/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/NativeImageApp.java @@ -35,6 +35,8 @@ public static void main(final String[] args) { String[] arguments = new String[] {getConnectionStringSystemPropertyOrDefault()}; LOGGER.info("proper args={}, tour/example arguments={}", Arrays.toString(args), Arrays.toString(arguments)); List errors = Stream.of( + new ThrowingRunnable.Named(Substitutions.class, + () -> Substitutions.main(arguments)), new ThrowingRunnable.Named(DnsSpi.class, () -> DnsSpi.main(arguments)), new ThrowingRunnable.Named(gridfs.GridFSTour.class, @@ -109,11 +111,21 @@ default Throwable runAndCatch() { final class Named implements ThrowingRunnable { private final String name; - private final ThrowingRunnable runnable; + private final ThrowingRunnable loggingRunnable; Named(final String name, final ThrowingRunnable runnable) { this.name = name; - this.runnable = runnable; + this.loggingRunnable = () -> { + LOGGER.info("Begin {}", name); + try { + runnable.run(); + } catch (Exception | AssertionError e) { + LOGGER.info("Failure in {}", name, e); + throw e; + } finally { + LOGGER.info("End {}", name); + } + }; } Named(final Class mainClass, final ThrowingRunnable runnable) { @@ -122,13 +134,13 @@ final class Named implements ThrowingRunnable { @Override public void run() throws Exception { - runnable.run(); + loggingRunnable.run(); } @Override @Nullable public Throwable runAndCatch() { - Throwable t = runnable.runAndCatch(); + Throwable t = loggingRunnable.runAndCatch(); if (t != null) { t = new AssertionError(name, t); } diff --git a/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/Substitutions.java b/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/Substitutions.java new file mode 100644 index 00000000000..e21d6e6d0bb --- /dev/null +++ b/graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/Substitutions.java @@ -0,0 +1,45 @@ +/* + * Copyright 2008-present MongoDB, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.mongodb.internal.graalvm; + +import com.mongodb.UnixServerAddress; +import com.mongodb.internal.graalvm.substitution.UnixServerAddressSubstitution; + +import static com.mongodb.assertions.Assertions.fail; +import static org.graalvm.nativeimage.ImageInfo.inImageRuntimeCode; + +final class Substitutions { + public static void main(final String... args) { + assertUnixServerAddressSubstitution(); + } + + private static void assertUnixServerAddressSubstitution() { + try { + new UnixServerAddress("/tmp/mongodb-27017.sock"); + if (inImageRuntimeCode()) { + fail(String.format("%s was not applied", UnixServerAddressSubstitution.class)); + } + } catch (UnsupportedOperationException e) { + if (!inImageRuntimeCode()) { + throw e; + } + // expected in GraalVM + } + } + + private Substitutions() { + } +} diff --git a/graalvm-native-image-app/src/main/resources/META-INF/native-image/jni-config.json b/graalvm-native-image-app/src/main/resources/META-INF/native-image/jni-config.json index c1dcb7f2ded..2be5d0ca308 100644 --- a/graalvm-native-image-app/src/main/resources/META-INF/native-image/jni-config.json +++ b/graalvm-native-image-app/src/main/resources/META-INF/native-image/jni-config.json @@ -1,184 +1,6 @@ [ -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_crypto_fn", - "methods":[{"name":"crypt","parameterTypes":["com.sun.jna.Pointer","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.sun.jna.Pointer","com.mongodb.crypt.capi.CAPI$mongocrypt_status_t"] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_hash_fn", - "methods":[{"name":"hash","parameterTypes":["com.sun.jna.Pointer","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.mongodb.crypt.capi.CAPI$mongocrypt_status_t"] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_hmac_fn", - "methods":[{"name":"hmac","parameterTypes":["com.sun.jna.Pointer","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","com.mongodb.crypt.capi.CAPI$mongocrypt_status_t"] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_log_fn_t", - "methods":[{"name":"log","parameterTypes":["int","com.mongodb.crypt.capi.CAPI$cstring","int","com.sun.jna.Pointer"] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_random_fn", - "methods":[{"name":"random","parameterTypes":["com.sun.jna.Pointer","com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t","int","com.mongodb.crypt.capi.CAPI$mongocrypt_status_t"] }] -}, { "name":"com.mongodb.internal.graalvm.NativeImageApp", "methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] -}, -{ - "name":"com.sun.jna.Callback" -}, -{ - "name":"com.sun.jna.CallbackReference", - "methods":[{"name":"getCallback","parameterTypes":["java.lang.Class","com.sun.jna.Pointer","boolean"] }, {"name":"getFunctionPointer","parameterTypes":["com.sun.jna.Callback","boolean"] }, {"name":"getNativeString","parameterTypes":["java.lang.Object","boolean"] }, {"name":"initializeThread","parameterTypes":["com.sun.jna.Callback","com.sun.jna.CallbackReference$AttachOptions"] }] -}, -{ - "name":"com.sun.jna.CallbackReference$AttachOptions" -}, -{ - "name":"com.sun.jna.FromNativeConverter", - "methods":[{"name":"nativeType","parameterTypes":[] }] -}, -{ - "name":"com.sun.jna.IntegerType", - "fields":[{"name":"value"}] -}, -{ - "name":"com.sun.jna.JNIEnv" -}, -{ - "name":"com.sun.jna.Native", - "methods":[{"name":"dispose","parameterTypes":[] }, {"name":"fromNative","parameterTypes":["com.sun.jna.FromNativeConverter","java.lang.Object","java.lang.reflect.Method"] }, {"name":"fromNative","parameterTypes":["java.lang.Class","java.lang.Object"] }, {"name":"fromNative","parameterTypes":["java.lang.reflect.Method","java.lang.Object"] }, {"name":"nativeType","parameterTypes":["java.lang.Class"] }, {"name":"toNative","parameterTypes":["com.sun.jna.ToNativeConverter","java.lang.Object"] }] -}, -{ - "name":"com.sun.jna.Native$ffi_callback", - "methods":[{"name":"invoke","parameterTypes":["long","long","long"] }] -}, -{ - "name":"com.sun.jna.NativeMapped", - "methods":[{"name":"toNative","parameterTypes":[] }] -}, -{ - "name":"com.sun.jna.Pointer", - "fields":[{"name":"peer"}], - "methods":[{"name":"","parameterTypes":["long"] }] -}, -{ - "name":"com.sun.jna.PointerType", - "fields":[{"name":"pointer"}] -}, -{ - "name":"com.sun.jna.Structure", - "fields":[{"name":"memory"}, {"name":"typeInfo"}], - "methods":[{"name":"autoRead","parameterTypes":[] }, {"name":"autoWrite","parameterTypes":[] }, {"name":"getTypeInfo","parameterTypes":[] }, {"name":"newInstance","parameterTypes":["java.lang.Class","long"] }] -}, -{ - "name":"com.sun.jna.Structure$ByValue" -}, -{ - "name":"com.sun.jna.Structure$FFIType$FFITypes", - "fields":[{"name":"ffi_type_double"}, {"name":"ffi_type_float"}, {"name":"ffi_type_longdouble"}, {"name":"ffi_type_pointer"}, {"name":"ffi_type_sint16"}, {"name":"ffi_type_sint32"}, {"name":"ffi_type_sint64"}, {"name":"ffi_type_sint8"}, {"name":"ffi_type_uint16"}, {"name":"ffi_type_uint32"}, {"name":"ffi_type_uint64"}, {"name":"ffi_type_uint8"}, {"name":"ffi_type_void"}] -}, -{ - "name":"com.sun.jna.WString", - "methods":[{"name":"","parameterTypes":["java.lang.String"] }] -}, -{ - "name":"java.lang.Boolean", - "fields":[{"name":"TYPE"}, {"name":"value"}], - "methods":[{"name":"","parameterTypes":["boolean"] }, {"name":"getBoolean","parameterTypes":["java.lang.String"] }] -}, -{ - "name":"java.lang.Byte", - "fields":[{"name":"TYPE"}, {"name":"value"}], - "methods":[{"name":"","parameterTypes":["byte"] }] -}, -{ - "name":"java.lang.Character", - "fields":[{"name":"TYPE"}, {"name":"value"}], - "methods":[{"name":"","parameterTypes":["char"] }] -}, -{ - "name":"java.lang.Class", - "methods":[{"name":"getComponentType","parameterTypes":[] }] -}, -{ - "name":"java.lang.Double", - "fields":[{"name":"TYPE"}, {"name":"value"}], - "methods":[{"name":"","parameterTypes":["double"] }] -}, -{ - "name":"java.lang.Float", - "fields":[{"name":"TYPE"}, {"name":"value"}], - "methods":[{"name":"","parameterTypes":["float"] }] -}, -{ - "name":"java.lang.Integer", - "fields":[{"name":"TYPE"}, {"name":"value"}], - "methods":[{"name":"","parameterTypes":["int"] }] -}, -{ - "name":"java.lang.Long", - "fields":[{"name":"TYPE"}, {"name":"value"}], - "methods":[{"name":"","parameterTypes":["long"] }] -}, -{ - "name":"java.lang.Object", - "methods":[{"name":"toString","parameterTypes":[] }] -}, -{ - "name":"java.lang.Short", - "fields":[{"name":"TYPE"}, {"name":"value"}], - "methods":[{"name":"","parameterTypes":["short"] }] -}, -{ - "name":"java.lang.String", - "methods":[{"name":"","parameterTypes":["byte[]"] }, {"name":"","parameterTypes":["byte[]","java.lang.String"] }, {"name":"getBytes","parameterTypes":[] }, {"name":"getBytes","parameterTypes":["java.lang.String"] }, {"name":"lastIndexOf","parameterTypes":["int"] }, {"name":"substring","parameterTypes":["int"] }, {"name":"toCharArray","parameterTypes":[] }] -}, -{ - "name":"java.lang.System", - "methods":[{"name":"getProperty","parameterTypes":["java.lang.String"] }, {"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }] -}, -{ - "name":"java.lang.UnsatisfiedLinkError", - "methods":[{"name":"","parameterTypes":["java.lang.String"] }] -}, -{ - "name":"java.lang.Void", - "fields":[{"name":"TYPE"}] -}, -{ - "name":"java.lang.reflect.Method", - "methods":[{"name":"getParameterTypes","parameterTypes":[] }, {"name":"getReturnType","parameterTypes":[] }] -}, -{ - "name":"java.nio.Buffer", - "methods":[{"name":"position","parameterTypes":[] }] -}, -{ - "name":"java.nio.ByteBuffer", - "methods":[{"name":"array","parameterTypes":[] }, {"name":"arrayOffset","parameterTypes":[] }] -}, -{ - "name":"java.nio.CharBuffer", - "methods":[{"name":"array","parameterTypes":[] }, {"name":"arrayOffset","parameterTypes":[] }] -}, -{ - "name":"java.nio.DoubleBuffer", - "methods":[{"name":"array","parameterTypes":[] }, {"name":"arrayOffset","parameterTypes":[] }] -}, -{ - "name":"java.nio.FloatBuffer", - "methods":[{"name":"array","parameterTypes":[] }, {"name":"arrayOffset","parameterTypes":[] }] -}, -{ - "name":"java.nio.IntBuffer", - "methods":[{"name":"array","parameterTypes":[] }, {"name":"arrayOffset","parameterTypes":[] }] -}, -{ - "name":"java.nio.LongBuffer", - "methods":[{"name":"array","parameterTypes":[] }, {"name":"arrayOffset","parameterTypes":[] }] -}, -{ - "name":"java.nio.ShortBuffer", - "methods":[{"name":"array","parameterTypes":[] }, {"name":"arrayOffset","parameterTypes":[] }] } -] \ No newline at end of file +] diff --git a/graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json b/graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json index 29ded3e5f40..609320d4645 100644 --- a/graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json +++ b/graalvm-native-image-app/src/main/resources/META-INF/native-image/reflect-config.json @@ -1,8 +1,4 @@ [ -{ - "name":"boolean", - "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}] -}, { "name":"ch.qos.logback.classic.encoder.PatternLayoutEncoder", "queryAllPublicMethods":true, @@ -65,176 +61,19 @@ "name":"ch.qos.logback.core.spi.ContextAware", "methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }] }, -{ - "name":"com.mongodb.BasicDBObject", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.mongodb.MongoNamespace", - "allDeclaredFields":true, - "queryAllDeclaredMethods":true, - "queryAllDeclaredConstructors":true -}, -{ - "name":"com.mongodb.WriteConcern", - "allPublicFields":true -}, -{ - "name":"com.mongodb.client.model.changestream.ChangeStreamDocument", - "allDeclaredFields":true, - "queryAllDeclaredMethods":true, - "queryAllDeclaredConstructors":true, - "methods":[{"name":"","parameterTypes":["java.lang.String","org.bson.BsonDocument","org.bson.BsonDocument","org.bson.BsonDocument","java.lang.Object","java.lang.Object","org.bson.BsonDocument","org.bson.BsonTimestamp","com.mongodb.client.model.changestream.UpdateDescription","org.bson.BsonInt64","org.bson.BsonDocument","org.bson.BsonDateTime","com.mongodb.client.model.changestream.SplitEvent","org.bson.BsonDocument"] }] -}, -{ - "name":"com.mongodb.client.model.changestream.SplitEvent", - "allDeclaredFields":true, - "queryAllDeclaredMethods":true, - "queryAllDeclaredConstructors":true -}, -{ - "name":"com.mongodb.client.model.changestream.TruncatedArray", - "allDeclaredFields":true, - "queryAllDeclaredMethods":true, - "queryAllDeclaredConstructors":true -}, -{ - "name":"com.mongodb.client.model.changestream.UpdateDescription", - "allDeclaredFields":true, - "queryAllDeclaredMethods":true, - "queryAllDeclaredConstructors":true, - "methods":[{"name":"","parameterTypes":["java.util.List","org.bson.BsonDocument","java.util.List","org.bson.BsonDocument"] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI", - "allPublicFields":true, - "queryAllDeclaredMethods":true -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$cstring", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_binary_t", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_crypto_fn", - "queryAllDeclaredMethods":true, - "queryAllPublicMethods":true -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_ctx_t", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_hash_fn", - "queryAllDeclaredMethods":true, - "queryAllPublicMethods":true -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_hmac_fn", - "queryAllDeclaredMethods":true, - "queryAllPublicMethods":true -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_kms_ctx_t", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_log_fn_t", - "queryAllDeclaredMethods":true, - "queryAllPublicMethods":true -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_random_fn", - "queryAllDeclaredMethods":true, - "queryAllPublicMethods":true -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_status_t", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.mongodb.crypt.capi.CAPI$mongocrypt_t", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.sun.crypto.provider.AESCipher$General", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.sun.crypto.provider.HmacCore$HmacSHA256", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.sun.crypto.provider.HmacCore$HmacSHA512", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.sun.jna.CallbackProxy", - "methods":[{"name":"callback","parameterTypes":["java.lang.Object[]"] }] -}, -{ - "name":"com.sun.jna.Pointer", - "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}] -}, -{ - "name":"com.sun.jna.Structure$FFIType", - "allDeclaredFields":true, - "queryAllPublicConstructors":true, - "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}], - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.sun.jna.Structure$FFIType$size_t", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"com.sun.jna.ptr.PointerByReference", - "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}], - "methods":[{"name":"","parameterTypes":[] }] -}, { "name":"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", "methods":[{"name":"","parameterTypes":[] }] }, -{ - "name":"int", - "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}] -}, { "name":"java.io.FilePermission" }, -{ - "name":"java.lang.Object", - "queryAllDeclaredMethods":true -}, -{ - "name":"java.lang.Record" -}, { "name":"java.lang.RuntimePermission" }, -{ - "name":"java.lang.Thread", - "fields":[{"name":"threadLocalRandomProbe"}] -}, -{ - "name":"java.lang.Throwable", - "methods":[{"name":"addSuppressed","parameterTypes":["java.lang.Throwable"] }] -}, -{ - "name":"java.lang.reflect.Method", - "methods":[{"name":"isVarArgs","parameterTypes":[] }] -}, { "name":"java.net.NetPermission" }, -{ - "name":"java.net.Socket", - "methods":[{"name":"setOption","parameterTypes":["java.net.SocketOption","java.lang.Object"] }] -}, { "name":"java.net.SocketPermission" }, @@ -242,25 +81,15 @@ "name":"java.net.URLPermission", "methods":[{"name":"","parameterTypes":["java.lang.String","java.lang.String"] }] }, -{ - "name":"java.nio.Buffer" -}, { "name":"java.security.AllPermission" }, -{ - "name":"java.security.SecureRandomParameters" -}, { "name":"java.security.SecurityPermission" }, { "name":"java.util.PropertyPermission" }, -{ - "name":"java.util.concurrent.ForkJoinTask", - "fields":[{"name":"aux"}, {"name":"status"}] -}, { "name":"java.util.concurrent.atomic.AtomicBoolean", "fields":[{"name":"value"}] @@ -269,36 +98,9 @@ "name":"java.util.concurrent.atomic.AtomicReference", "fields":[{"name":"value"}] }, -{ - "name":"java.util.concurrent.atomic.Striped64", - "fields":[{"name":"base"}, {"name":"cellsBusy"}] -}, { "name":"javax.smartcardio.CardPermission" }, -{ - "name":"jdk.internal.misc.Unsafe" -}, -{ - "name":"jdk.net.ExtendedSocketOptions", - "fields":[{"name":"TCP_KEEPCOUNT"}, {"name":"TCP_KEEPIDLE"}, {"name":"TCP_KEEPINTERVAL"}] -}, -{ - "name":"long", - "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}] -}, -{ - "name":"org.bson.codecs.kotlin.DataClassCodecProvider" -}, -{ - "name":"org.bson.codecs.kotlinx.KotlinSerializerCodecProvider" -}, -{ - "name":"org.bson.codecs.record.RecordCodecProvider" -}, -{ - "name":"org.slf4j.Logger" -}, { "name":"reactivestreams.tour.Address", "allDeclaredFields":true, @@ -313,118 +115,6 @@ "queryAllDeclaredConstructors":true, "methods":[{"name":"","parameterTypes":[] }, {"name":"getAddress","parameterTypes":[] }, {"name":"getAge","parameterTypes":[] }, {"name":"getId","parameterTypes":[] }, {"name":"getName","parameterTypes":[] }, {"name":"setAddress","parameterTypes":["reactivestreams.tour.Address"] }, {"name":"setAge","parameterTypes":["int"] }, {"name":"setId","parameterTypes":["org.bson.types.ObjectId"] }, {"name":"setName","parameterTypes":["java.lang.String"] }] }, -{ - "name":"reactor.core.publisher.BaseSubscriber", - "fields":[{"name":"subscription"}] -}, -{ - "name":"reactor.core.publisher.FlatMapTracker", - "fields":[{"name":"size"}] -}, -{ - "name":"reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber", - "fields":[{"name":"requested"}] -}, -{ - "name":"reactor.core.publisher.FluxCreate$BaseSink", - "fields":[{"name":"disposable"}, {"name":"requestConsumer"}, {"name":"requested"}] -}, -{ - "name":"reactor.core.publisher.FluxCreate$BufferAsyncSink", - "fields":[{"name":"wip"}] -}, -{ - "name":"reactor.core.publisher.FluxCreate$SerializedFluxSink", - "fields":[{"name":"error"}, {"name":"wip"}] -}, -{ - "name":"reactor.core.publisher.FluxDoFinally$DoFinallySubscriber", - "fields":[{"name":"once"}] -}, -{ - "name":"reactor.core.publisher.FluxFlatMap$FlatMapInner", - "fields":[{"name":"s"}] -}, -{ - "name":"reactor.core.publisher.FluxFlatMap$FlatMapMain", - "fields":[{"name":"error"}, {"name":"requested"}, {"name":"wip"}] -}, -{ - "name":"reactor.core.publisher.FluxIterable$IterableSubscription", - "fields":[{"name":"requested"}] -}, -{ - "name":"reactor.core.publisher.LambdaMonoSubscriber", - "fields":[{"name":"subscription"}] -}, -{ - "name":"reactor.core.publisher.LambdaSubscriber", - "fields":[{"name":"subscription"}] -}, -{ - "name":"reactor.core.publisher.MonoCallable$MonoCallableSubscription", - "fields":[{"name":"requestedOnce"}] -}, -{ - "name":"reactor.core.publisher.MonoCreate$DefaultMonoSink", - "fields":[{"name":"disposable"}, {"name":"requestConsumer"}, {"name":"state"}] -}, -{ - "name":"reactor.core.publisher.MonoFlatMap$FlatMapMain", - "fields":[{"name":"second"}] -}, -{ - "name":"reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain", - "fields":[{"name":"inner"}, {"name":"requested"}] -}, -{ - "name":"reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain", - "fields":[{"name":"state"}] -}, -{ - "name":"reactor.core.publisher.MonoNext$NextSubscriber", - "fields":[{"name":"wip"}] -}, -{ - "name":"reactor.core.publisher.Operators$BaseFluxToMonoOperator", - "fields":[{"name":"state"}] -}, -{ - "name":"reactor.core.publisher.Operators$MultiSubscriptionSubscriber", - "fields":[{"name":"missedProduced"}, {"name":"missedRequested"}, {"name":"missedSubscription"}, {"name":"wip"}] -}, -{ - "name":"reactor.core.publisher.StrictSubscriber", - "fields":[{"name":"error"}, {"name":"requested"}, {"name":"s"}, {"name":"wip"}] -}, -{ - "name":"reactor.util.concurrent.MpscLinkedQueue", - "fields":[{"name":"consumerNode"}, {"name":"producerNode"}] -}, -{ - "name":"reactor.util.concurrent.MpscLinkedQueue$LinkedQueueNode", - "fields":[{"name":"next"}] -}, -{ - "name":"reactor.util.concurrent.SpscLinkedArrayQueue", - "fields":[{"name":"consumerIndex"}, {"name":"producerIndex"}] -}, -{ - "name":"sun.security.provider.NativePRNG", - "methods":[{"name":"","parameterTypes":[] }, {"name":"","parameterTypes":["java.security.SecureRandomParameters"] }] -}, -{ - "name":"sun.security.provider.SHA", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"sun.security.provider.SHA2$SHA256", - "methods":[{"name":"","parameterTypes":[] }] -}, -{ - "name":"sun.security.provider.SHA5$SHA512", - "methods":[{"name":"","parameterTypes":[] }] -}, { "name":"tour.Address", "allDeclaredFields":true, @@ -438,9 +128,5 @@ "queryAllDeclaredMethods":true, "queryAllDeclaredConstructors":true, "methods":[{"name":"","parameterTypes":[] }, {"name":"getAddress","parameterTypes":[] }, {"name":"getAge","parameterTypes":[] }, {"name":"getId","parameterTypes":[] }, {"name":"getName","parameterTypes":[] }, {"name":"setAddress","parameterTypes":["tour.Address"] }, {"name":"setAge","parameterTypes":["int"] }, {"name":"setId","parameterTypes":["org.bson.types.ObjectId"] }, {"name":"setName","parameterTypes":["java.lang.String"] }] -}, -{ - "name":"void", - "fields":[{"name":"OPTIONS"}, {"name":"STRING_ENCODING"}, {"name":"STRUCTURE_ALIGNMENT"}, {"name":"TYPE_MAPPER"}] } -] \ No newline at end of file +] diff --git a/graalvm-native-image-app/src/main/resources/META-INF/native-image/resource-config.json b/graalvm-native-image-app/src/main/resources/META-INF/native-image/resource-config.json index ece741c68e4..d4bf7ea12ff 100644 --- a/graalvm-native-image-app/src/main/resources/META-INF/native-image/resource-config.json +++ b/graalvm-native-image-app/src/main/resources/META-INF/native-image/resource-config.json @@ -1,24 +1,6 @@ { "resources":{ "includes":[{ - "pattern":"\\QMETA-INF/services/ch.qos.logback.classic.spi.Configurator\\E" - }, { - "pattern":"\\QMETA-INF/services/java.lang.System$LoggerFinder\\E" - }, { - "pattern":"\\QMETA-INF/services/java.net.spi.InetAddressResolverProvider\\E" - }, { - "pattern":"\\QMETA-INF/services/java.net.spi.URLStreamHandlerProvider\\E" - }, { - "pattern":"\\QMETA-INF/services/java.nio.channels.spi.AsynchronousChannelProvider\\E" - }, { - "pattern":"\\QMETA-INF/services/java.nio.channels.spi.SelectorProvider\\E" - }, { - "pattern":"\\QMETA-INF/services/java.time.zone.ZoneRulesProvider\\E" - }, { - "pattern":"\\QMETA-INF/services/javax.xml.parsers.SAXParserFactory\\E" - }, { - "pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E" - }, { "pattern":"\\Qcom/sun/jna/darwin-aarch64/libjnidispatch.jnilib\\E" }, { "pattern":"\\Qcom/sun/jna/darwin-x86-64/libjnidispatch.jnilib\\E" @@ -44,6 +26,24 @@ "pattern":"\\Qlinux-x86-64/libmongocrypt.so\\E" }, { "pattern":"\\Qwin32-x86-64/mongocrypt.dll\\E" + }, { + "pattern":"\\QMETA-INF/services/ch.qos.logback.classic.spi.Configurator\\E" + }, { + "pattern":"\\QMETA-INF/services/java.lang.System$LoggerFinder\\E" + }, { + "pattern":"\\QMETA-INF/services/java.net.spi.InetAddressResolverProvider\\E" + }, { + "pattern":"\\QMETA-INF/services/java.net.spi.URLStreamHandlerProvider\\E" + }, { + "pattern":"\\QMETA-INF/services/java.nio.channels.spi.AsynchronousChannelProvider\\E" + }, { + "pattern":"\\QMETA-INF/services/java.nio.channels.spi.SelectorProvider\\E" + }, { + "pattern":"\\QMETA-INF/services/java.time.zone.ZoneRulesProvider\\E" + }, { + "pattern":"\\QMETA-INF/services/javax.xml.parsers.SAXParserFactory\\E" + }, { + "pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E" }, { "pattern":"\\Qlogback-test.scmo\\E" }, { diff --git a/graalvm-native-image-app/src/main/resources/META-INF/services/com.mongodb.spi.dns.DnsClientProvider b/graalvm-native-image-app/src/main/resources/META-INF/services/com.mongodb.spi.dns.DnsClientProvider new file mode 100644 index 00000000000..4b53a569c91 --- /dev/null +++ b/graalvm-native-image-app/src/main/resources/META-INF/services/com.mongodb.spi.dns.DnsClientProvider @@ -0,0 +1 @@ +com.mongodb.internal.graalvm.CustomDnsClientProvider