java.security.ProviderException: update() failed at sun.security.pkcs11.P11Mac.engineUpdate(jdk.crypto.pkcs11@9-ea/P11Mac.java:244) at javax.crypto.Mac.update(java.base@9-ea/Mac.java:493) at com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(java.base@9-ea/PBKDF2KeyImpl.java:179) at com.sun.crypto.provider.PBKDF2KeyImpl.<init>(java.base@9-ea/PBKDF2KeyImpl.java:122) at com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(java.base@9-ea/PBKDF2Core.java:69) at javax.crypto.SecretKeyFactory.generateSecret(java.base@9-ea/SecretKeyFactory.java:338)

JDK Bug System | Rajan Halade | 3 months ago
  1. 0

    com/sun/crypto/provider/KeyFactory/PBKDF2HmacSHA1FactoryTest.java ----------System.out:(6/114)---------- =>Testing vector#1 =>Testing vector#2 =>Testing vector#3 =>Testing vector#4 =>Testing vector#5 =>Testing vector#6 ----------System.err:(25/1771)---------- java.security.ProviderException: update() failed at sun.security.pkcs11.P11Mac.engineUpdate(jdk.crypto.pkcs11@9-ea/P11Mac.java:244) at javax.crypto.Mac.update(java.base@9-ea/Mac.java:493) at com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(java.base@9-ea/PBKDF2KeyImpl.java:179) at com.sun.crypto.provider.PBKDF2KeyImpl.<init>(java.base@9-ea/PBKDF2KeyImpl.java:122) at com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(java.base@9-ea/PBKDF2Core.java:69) at javax.crypto.SecretKeyFactory.generateSecret(java.base@9-ea/SecretKeyFactory.java:338) at PBKDF2HmacSHA1FactoryTest.test(PBKDF2HmacSHA1FactoryTest.java:77) at PBKDF2HmacSHA1FactoryTest.main(PBKDF2HmacSHA1FactoryTest.java:138) 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:535) at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226) at java.lang.Thread.run(java.base@9-ea/Thread.java:843) Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_OPERATION_ACTIVE at sun.security.pkcs11.wrapper.PKCS11.C_SignInit(jdk.crypto.pkcs11@9-ea/Native Method) at sun.security.pkcs11.P11Mac.initialize(jdk.crypto.pkcs11@9-ea/P11Mac.java:170) at sun.security.pkcs11.P11Mac.ensureInitialized(jdk.crypto.pkcs11@9-ea/P11Mac.java:141) at sun.security.pkcs11.P11Mac.engineUpdate(jdk.crypto.pkcs11@9-ea/P11Mac.java:240) ... 13 more

    JDK Bug System | 3 months ago | Rajan Halade
    java.security.ProviderException: update() failed at sun.security.pkcs11.P11Mac.engineUpdate(jdk.crypto.pkcs11@9-ea/P11Mac.java:244) at javax.crypto.Mac.update(java.base@9-ea/Mac.java:493) at com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(java.base@9-ea/PBKDF2KeyImpl.java:179) at com.sun.crypto.provider.PBKDF2KeyImpl.<init>(java.base@9-ea/PBKDF2KeyImpl.java:122) at com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(java.base@9-ea/PBKDF2Core.java:69) at javax.crypto.SecretKeyFactory.generateSecret(java.base@9-ea/SecretKeyFactory.java:338)
  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 | 8 months 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)
  3. 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 | 8 months 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)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Note: C:\jprt\T\P1\221154.vpeng\s\jdk\test\sun\security\pkcs11\PKCS11Test.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. ACTION: main -- Failed. Execution failed: `main' threw exception: java.security.ProviderException: Initialization failed REASON: User specified action: run main/othervm SupportedDHKeys TIME: 0.281 seconds messages: command: main SupportedDHKeys reason: User specified action: run main/othervm SupportedDHKeys elapsed time (seconds): 0.281 STDOUT: libsoftokn3 version = 3.16. ECC Extended. Beginning test run SupportedDHKeys... STDERR: java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:380) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:111) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:108) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:108) at PKCS11Test.getSunPKCS11(PKCS11Test.java:151) at PKCS11Test.testNSS(PKCS11Test.java:518) at PKCS11Test.main(PKCS11Test.java:203) at SupportedDHKeys.main(SupportedDHKeys.java:125) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-internal/Thread.java:804) Caused by: java.io.IOException: The specified module could not be found. C:\jprt\T\P1\221154.vpeng\s\jdk\test\sun\security\pkcs11\nss\lib\windows-i586\softokn3.dll at sun.security.pkcs11.wrapper.PKCS11.connect(jdk.crypto.pkcs11@9-internal/Native Method) at sun.security.pkcs11.wrapper.PKCS11.<init>(jdk.crypto.pkcs11@9-internal/PKCS11.java:138) at sun.security.pkcs11.wrapper.PKCS11.getInstance(jdk.crypto.pkcs11@9-internal/PKCS11.java:151) at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:317) ... 14 more JavaTest Message: Test threw exception: java.security.ProviderException: Initialization failed JavaTest Message: shutting down test And same goes for the UnsupportedDHKeys test as well. Beginning test run UnsupportedDHKeys... STDERR: java.security.ProviderException: Initialization failed BTW, ------------------------------------------- command: build SupportedDHParamGens reason: Named class compiled on demand elapsed time (seconds): 0.0 ACTION: main -- Error. Agent error: java.lang.Exception: Agent timed out with a timeout of 1800 seconds; check console log for any additional details REASON: User specified action: run main/timeout=450 SupportedDHParamGens 3072 Also found this test failure in a JPRT run: --------------------------------------------------- command: build SupportedDHParamGens reason: Named class compiled on demand elapsed time (seconds): 0.0 ACTION: main -- Error. Agent error: java.lang.Exception: Agent timed out with a timeout of 1800 seconds; check console log for any additional details REASON: User specified action: run main/timeout=450 SupportedDHParamGens 3072 -------------------------------------------

    JDK Bug System | 7 months ago | Xue-Lei Fan
    java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:380) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:111) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:108) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:108)
  6. 0

    Note: C:\jprt\T\P1\221154.vpeng\s\jdk\test\sun\security\pkcs11\PKCS11Test.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. ACTION: main -- Failed. Execution failed: `main' threw exception: java.security.ProviderException: Initialization failed REASON: User specified action: run main/othervm SupportedDHKeys TIME: 0.281 seconds messages: command: main SupportedDHKeys reason: User specified action: run main/othervm SupportedDHKeys elapsed time (seconds): 0.281 STDOUT: libsoftokn3 version = 3.16. ECC Extended. Beginning test run SupportedDHKeys... STDERR: java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:380) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:111) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:108) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:108) at PKCS11Test.getSunPKCS11(PKCS11Test.java:151) at PKCS11Test.testNSS(PKCS11Test.java:518) at PKCS11Test.main(PKCS11Test.java:203) at SupportedDHKeys.main(SupportedDHKeys.java:125) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(java.base@9-internal/Thread.java:804) Caused by: java.io.IOException: The specified module could not be found. C:\jprt\T\P1\221154.vpeng\s\jdk\test\sun\security\pkcs11\nss\lib\windows-i586\softokn3.dll at sun.security.pkcs11.wrapper.PKCS11.connect(jdk.crypto.pkcs11@9-internal/Native Method) at sun.security.pkcs11.wrapper.PKCS11.<init>(jdk.crypto.pkcs11@9-internal/PKCS11.java:138) at sun.security.pkcs11.wrapper.PKCS11.getInstance(jdk.crypto.pkcs11@9-internal/PKCS11.java:151) at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:317) ... 14 more JavaTest Message: Test threw exception: java.security.ProviderException: Initialization failed JavaTest Message: shutting down test And same goes for the UnsupportedDHKeys test as well. Beginning test run UnsupportedDHKeys... STDERR: java.security.ProviderException: Initialization failed BTW, ------------------------------------------- command: build SupportedDHParamGens reason: Named class compiled on demand elapsed time (seconds): 0.0 ACTION: main -- Error. Agent error: java.lang.Exception: Agent timed out with a timeout of 1800 seconds; check console log for any additional details REASON: User specified action: run main/timeout=450 SupportedDHParamGens 3072 Also found this test failure in a JPRT run: --------------------------------------------------- command: build SupportedDHParamGens reason: Named class compiled on demand elapsed time (seconds): 0.0 ACTION: main -- Error. Agent error: java.lang.Exception: Agent timed out with a timeout of 1800 seconds; check console log for any additional details REASON: User specified action: run main/timeout=450 SupportedDHParamGens 3072 -------------------------------------------

    JDK Bug System | 7 months ago | Xue-Lei Fan
    java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:380) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:111) at sun.security.pkcs11.SunPKCS11$1.run(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:108) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at sun.security.pkcs11.SunPKCS11.configure(jdk.crypto.pkcs11@9-internal/SunPKCS11.java:108)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.security.ProviderException

      update() failed at sun.security.pkcs11.P11Mac.engineUpdate(jdk.crypto.pkcs11@9-ea/P11Mac.java:244) at javax.crypto.Mac.update(java.base@9-ea/Mac.java:493) at com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(java.base@9-ea/PBKDF2KeyImpl.java:179) at com.sun.crypto.provider.PBKDF2KeyImpl.<init>(java.base@9-ea/PBKDF2KeyImpl.java:122) at com.sun.crypto.provider.PBKDF2Core.engineGenerateSecret(java.base@9-ea/PBKDF2Core.java:69) at javax.crypto.SecretKeyFactory.generateSecret(java.base@9-ea/SecretKeyFactory.java:338)

      at PBKDF2HmacSHA1FactoryTest.test()
    2. Unknown
      PBKDF2HmacSHA1FactoryTest.main
      1. PBKDF2HmacSHA1FactoryTest.test(PBKDF2HmacSHA1FactoryTest.java:77)
      2. PBKDF2HmacSHA1FactoryTest.main(PBKDF2HmacSHA1FactoryTest.java:138)
      2 frames