java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:381) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:112) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109)

JDK Bug System | Felix Yang | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Two tests failed in jdk 9 dev nightly: sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java Both of them failed with similar reasons. Please refer the copy of log below: ----------System.out:(2/85)---------- libsoftokn3 version = 3.16. ECC Extended. Beginning test run UnsupportedDHKeys... ----------System.err:(28/1972)*---------- java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:381) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:112) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109) at PKCS11Test.getSunPKCS11(PKCS11Test.java:151) at PKCS11Test.testNSS(PKCS11Test.java:518) at PKCS11Test.main(PKCS11Test.java:203) at UnsupportedDHKeys.main(UnsupportedDHKeys.java:84) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-ea/Thread.java:804) Caused by: java.io.IOException: The specified module could not be found. C:\\Users\\aurora\\sandbox\\testbase\\jdk\\test\\sun\\security\\pkcs11\\nss\\lib\\windows-amd64\\softokn3.dll at sun.security.pkcs11.wrapper.PKCS11.connect(jdk.crypto.pkcs11@9-ea/Native Method) at sun.security.pkcs11.wrapper.PKCS11.<init>(jdk.crypto.pkcs11@9-ea/PKCS11.java:138) at sun.security.pkcs11.wrapper.PKCS11.getInstance(jdk.crypto.pkcs11@9-ea/PKCS11.java:151) at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:318) ... 14 more JavaTest Message: Test threw exception: java.security.ProviderException: Initialization failed

    JDK Bug System | 1 year ago | Felix Yang
    java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:381) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:112) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109)
  2. 0

    Two tests failed in jdk 9 dev nightly: sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java Both of them failed with similar reasons. Please refer the copy of log below: ----------System.out:(2/85)---------- libsoftokn3 version = 3.16. ECC Extended. Beginning test run UnsupportedDHKeys... ----------System.err:(28/1972)*---------- java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:381) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:112) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109) at PKCS11Test.getSunPKCS11(PKCS11Test.java:151) at PKCS11Test.testNSS(PKCS11Test.java:518) at PKCS11Test.main(PKCS11Test.java:203) at UnsupportedDHKeys.main(UnsupportedDHKeys.java:84) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:531) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-ea/Thread.java:804) Caused by: java.io.IOException: The specified module could not be found. C:\\Users\\aurora\\sandbox\\testbase\\jdk\\test\\sun\\security\\pkcs11\\nss\\lib\\windows-amd64\\softokn3.dll at sun.security.pkcs11.wrapper.PKCS11.connect(jdk.crypto.pkcs11@9-ea/Native Method) at sun.security.pkcs11.wrapper.PKCS11.<init>(jdk.crypto.pkcs11@9-ea/PKCS11.java:138) at sun.security.pkcs11.wrapper.PKCS11.getInstance(jdk.crypto.pkcs11@9-ea/PKCS11.java:151) at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:318) ... 14 more JavaTest Message: Test threw exception: java.security.ProviderException: Initialization failed

    JDK Bug System | 1 year ago | Felix Yang
    java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:381) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:112) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109)

    Root Cause Analysis

    1. java.security.ProviderException

      Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:381) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:112) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109) at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-ea/SunPKCS11.java:109)

      at PKCS11Test.getSunPKCS11()
    2. Unknown
      UnsupportedDHKeys.main
      1. PKCS11Test.getSunPKCS11(PKCS11Test.java:151)
      2. PKCS11Test.testNSS(PKCS11Test.java:518)
      3. PKCS11Test.main(PKCS11Test.java:203)
      4. UnsupportedDHKeys.main(UnsupportedDHKeys.java:84)
      4 frames