Skip to content

No svm 22.1.0 artifact in maven central #4518

@danslapman

Description

@danslapman

Describe the issue
There is no org.graalvm.nativeimage:svm:22.1.0 artifact in maven central. Building with 22.0.0.2 dependency on graal 22.1.0 leads to error:

[error] Error: ImageSingletons.add must not overwrite existing key com.oracle.svm.core.jdk.ProtectionDomainSupport
[error] Existing value: com.oracle.svm.core.jdk.ProtectionDomainSupport@5217f3d0
[error] New value: com.oracle.svm.core.jdk.ProtectionDomainSupport@37ebc9d8
[error] Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception

I'm using svm to implement autofeature:

 import com.oracle.svm.core.annotate.*;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.graalvm.nativeimage.ImageSingletons;
import org.graalvm.nativeimage.hosted.Feature;
import org.graalvm.nativeimage.hosted.RuntimeClassInitialization;
import org.graalvm.nativeimage.impl.RuntimeClassInitializationSupport;

import java.security.Security;

@AutomaticFeature
public class BouncyCastleFeature implements Feature {

    @Override
    public void afterRegistration(AfterRegistrationAccess access) {
        RuntimeClassInitialization.initializeAtBuildTime("org.bouncycastle");
        RuntimeClassInitializationSupport rci = ImageSingletons.lookup(RuntimeClassInitializationSupport.class);
        rci.rerunInitialization("org.bouncycastle.jcajce.provider.drbg.DRBG$Default", "");
        rci.rerunInitialization("org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV", "");
        Security.addProvider(new BouncyCastleProvider());
    }
}

Describe GraalVM and your environment:

  • GraalVM version (latest snapshot builds can be found here), or commit id if built from source: 22.1.0

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions