Search code examples
javaartifactory

Artifactory-oss-6.23.42 with Java 17 : ClassNotFoundException: com/sun/security/cert/internal/x509/X509V1CertImpl


Installing Artifactory-oss-6.23.42

With Java 17.

When boot up i am getting following

java.lang.IllegalStateException: Failed to generate and save private key and root certificate. org.jfrog.security.ssl.CertificateGenerationException: Failed to generate signed certificate: Could not find class: java.lang.ClassNotFoundException: com/sun/security/cert/internal/x509/X509V1CertImpl

Any suggestion how to fix this? Is it issue with Java 17 or do i need to do something else?


Solution

  • According to JFrog Artifactory Version 6.0 User Guide, the requirement is

    Artifactory must run with JDK 8 (JDK 8 update 45 and above preferred) or JDK 11 (from Artifactory version 6.10).

    So, the upper limit for Artifactory 6 is Java 11. It looks like Artifactory used one of the internal classes of Java, which they shouldn't have, and likely Java 17 (or some version in between) moved, removed or renamed that internal class or made it otherwise inaccessible.

    Alternatively, use Artifactory 7 instead, as recent versions of Artifactory 7 do support Java 17.