java.lang.reflect.InvocationTargetException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • There are 56 new failures failed in JDK8 b112 at Win10 x64 platform with following error message: Aurora result: http://aurora.us.oracle.com/functional/faces/RunDetails.xhtml?names=1558852.ManualSubmit-1 Beginning test run ReinitCipher... ----------System.err:(31/1829)*---------- java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at PKCS11Test.getSunPKCS11(PKCS11Test.java:79) at PKCS11Test.testNSS(PKCS11Test.java:402) at PKCS11Test.main(PKCS11Test.java:98) at ReinitCipher.main(ReinitCipher.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(Thread.java:745) Caused by: java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:376) at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:103) ... 14 more Caused by: java.io.IOException: Access is denied. C:\\jdk\\8u112b08\\8u112b08\\test\\sun\\security\\pkcs11\\nss\\lib\\windows-amd64\\softokn3.dll at sun.security.pkcs11.wrapper.PKCS11.connect(Native Method) at sun.security.pkcs11.wrapper.PKCS11.<init>(PKCS11.java:138) at sun.security.pkcs11.wrapper.PKCS11.getInstance(PKCS11.java:151) at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:313) ... 15 more JavaTest Message: Test threw exception: java.lang.reflect.InvocationTargetException JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.reflect.InvocationTargetException ----------rerun:(22/1905)*---------- PATH='C:\\cygwin\\usr\\local\\bin;C:\\cygwin\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0' \\ SystemDrive=C: \\ SystemRoot='C:\\Windows' \\ TEMP='C:\\cygwin\\tmp' \\ TMP='C:\\cygwin\\tmp' \\ TZ=America/Los_Angeles \\ windir='C:\\Windows' \\ CLASSPATH='C:\\jdk\\8u112b08\\8u112b08\\workDir\\classes\\sun\\security\\pkcs11\\Cipher;C:\\jdk\\8u112b08\\8u112b08\\test\\sun\\security\\pkcs11\\Cipher;C:\\jdk\\8u112b08\\8u112b08\\workDir\\classes\\sun\\security\\pkcs11;C:\\jdk\\8u112b08\\8u112b08\\test\\sun\\security\\pkcs11;C:\\jdk\\8u112b08\\8u112b08\\..\\jdk1.8.0_112\\lib\\tools.jar;C:\\jdk\\8u112b08\\8u112b08\\jct-tools\\lib\\javatest.jar;C:\\jdk\\8u112b08\\8u112b08\\jct-tools\\lib\\jtreg.jar' \\ 'C:\\jdk\\8u112b08\\8u112b08\\..\\jdk1.8.0_112\\bin\\java' \\ -Dtest.src='C:\\jdk\\8u112b08\\8u112b08\\test\\sun\\security\\pkcs11\\Cipher' \\ -Dtest.src.path='C:\\jdk\\8u112b08\\8u112b08\\test\\sun\\security\\pkcs11\\Cipher;C:\\jdk\\8u112b08\\8u112b08\\test\\sun\\security\\pkcs11' \\ -Dtest.classes='C:\\jdk\\8u112b08\\8u112b08\\workDir\\classes\\sun\\security\\pkcs11\\Cipher' \\ -Dtest.class.path='C:\\jdk\\8u112b08\\8u112b08\\workDir\\classes\\sun\\security\\pkcs11\\Cipher;C:\\jdk\\8u112b08\\8u112b08\\workDir\\classes\\sun\\security\\pkcs11' \\ -Dtest.vm.opts=-Dfile.encoding=UTF-8 \\ -Dtest.tool.vm.opts=-J-Dfile.encoding=UTF-8 \\ -Dtest.compiler.opts= \\ -Dtest.java.opts= \\ -Dtest.jdk='C:\\jdk\\8u112b08\\8u112b08\\..\\jdk1.8.0_112' \\ -Dcompile.jdk='C:\\jdk\\8u112b08\\8u112b08\\..\\jdk1.8.0_112' \\ -Dtest.timeout.factor=1.0 \\ -Dfile.encoding=UTF-8 \\ com.sun.javatest.regtest.agent.MainWrapper 'C:\\jdk\\8u112b08\\8u112b08\\workDir\\sun\\security\\pkcs11\\Cipher\\ReinitCipher.d\\main.0.jta' result: Failed. Execution failed: `main' threw exception: java.lang.reflect.InvocationTargetException test result: Failed. Execution failed: `main' threw exception: java.lang.reflect.InvocationTargetException
    via by Daisy Zhou,
  • Configuring a CA in HSM
    via ejbca by badda
    ,
  • GitHub comment 4#272124022
    via GitHub by Yousefjb
    ,
  • java complains on loading pkcs dll from softhsm
    via Stack Overflow by Slok
    ,
  • Mozilla - Cryptography - SunPKCS11 and NSS 3.11.4
    via by Unknown author,
  • This forum is for discussions about cryptography
    via by Unknown author,
    • java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at PKCS11Test.getSunPKCS11(PKCS11Test.java:79) at PKCS11Test.testNSS(PKCS11Test.java:402) at PKCS11Test.main(PKCS11Test.java:98) at ReinitCipher.main(ReinitCipher.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110) at java.lang.Thread.run(Thread.java:745) Caused by: java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:376) at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:103) ... 14 more Caused by: java.io.IOException: Access is denied. C:\\jdk\\8u112b08\\8u112b08\\test\\sun\\security\\pkcs11\\nss\\lib\\windows-amd64\\softokn3.dll at sun.security.pkcs11.wrapper.PKCS11.connect(Native Method) at sun.security.pkcs11.wrapper.PKCS11.<init>(PKCS11.java:138) at sun.security.pkcs11.wrapper.PKCS11.getInstance(PKCS11.java:151) at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:313) ... 15 more

    Users with the same issue

    Unknown visitor1 times, last one,