Closed
Description
Describe the issue
Reported by @bdemers here: #2666 (comment)
Steps to reproduce the issue
You can build this branch with r17: okta/okta-cli#301
Describe GraalVM and your environment:
$ native-image --version
GraalVM 22.1.0-dev Java 17 CE (Java Version 17.0.3+4-jvmci-22.1-b03)
Reprodcued on darwin-amd64 and darwin-aarch64.
More details
Error: ImageSingletons.add must not overwrite existing key com.oracle.svm.core.jdk.ProtectionDomainSupport
Existing value: com.oracle.svm.core.jdk.ProtectionDomainSupport@2e140e59
New value: com.oracle.svm.core.jdk.ProtectionDomainSupport@49a71302
com.oracle.svm.core.util.UserError$UserException: ImageSingletons.add must not overwrite existing key com.oracle.svm.core.jdk.ProtectionDomainSupport
Existing value: com.oracle.svm.core.jdk.ProtectionDomainSupport@2e140e59
New value: com.oracle.svm.core.jdk.ProtectionDomainSupport@49a71302
at com.oracle.svm.core.util.UserError.abort(UserError.java:72)
at com.oracle.svm.hosted.ImageSingletonsSupportImpl$HostedManagement.doAdd(ImageSingletonsSupportImpl.java:109)
at com.oracle.svm.hosted.ImageSingletonsSupportImpl.add(ImageSingletonsSupportImpl.java:39)
at org.graalvm.sdk/org.graalvm.nativeimage.ImageSingletons.add(ImageSingletons.java:73)
at com.oracle.svm.hosted.ProtectionDomainFeature.afterRegistration(ProtectionDomainFeature.java:48)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$setupNativeImage$14(NativeImageGenerator.java:827)
at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:74)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:827)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:554)
at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:514)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:413)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:591)
at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:129)
at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:621)