java.lang.ExceptionInInitializerError

JDK Bug System | Sean Coffey | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    3rd party Jsafe provider registered in JDK. When initializing and debugging via java.security.debug=provider flag, we hit an NPE : [java] Provider: MessageDigest.SHA-256 algorithm from: SUN [java] Provider: Signature.SHA256withRSA verification algorithm from: SunRsaSign [java] Provider: MessageDigest.SHA-256 algorithm from: SUN [java] Provider: MessageDigest.SHA algorithm from: JsafeJCE [java] Exception in thread "main" java.lang.ExceptionInInitializerError [java] at javax.crypto.JceSecurity.loadPolicies(JceSecurity.java:318) [java] at javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:263) [java] at javax.crypto.JceSecurity.access$000(JceSecurity.java:48) [java] at javax.crypto.JceSecurity$1.run(JceSecurity.java:81) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:78) [java] at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:204) [java] at jce.common.AESKeyUtil.getSecretKey(AESKeyUtil.java:64) [java] at jce.asymCipher.RSAEncryptWithOAEP.runSample(RSAEncryptWithOAEP.java:86) [java] at jce.asymCipher.RSAEncryptWithOAEP.main(RSAEncryptWithOAEP.java:56) [java] Caused by: java.lang.SecurityException: Framework jar verification can not be initialized [java] at javax.crypto.JarVerifier.<clinit>(JarVerifier.java:189) [java] ... 10 more [java] Caused by: java.lang.NullPointerException [java] at java.security.Signature.initVerify(Signature.java:462) [java] at com.rsa.cryptoj.o.pq.a(Unknown Source) [java] at com.rsa.cryptoj.o.pq.verify(Unknown Source) [java] at javax.crypto.JarVerifier.testSignatures(JarVerifier.java:737) [java] at javax.crypto.JarVerifier.access$400(JarVerifier.java:34) [java] at javax.crypto.JarVerifier$1.run(JarVerifier.java:183) [java] at javax.crypto.JarVerifier$1.run(JarVerifier.java:149) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at javax.crypto.JarVerifier.<clinit>(JarVerifier.java:148)

    JDK Bug System | 5 months ago | Sean Coffey
    java.lang.ExceptionInInitializerError

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at java.security.Signature.initVerify()
    2. Java RT
      Signature.initVerify
      1. java.security.Signature.initVerify(Signature.java:462)
      1 frame
    3. com.rsa.cryptoj
      pq.verify
      1. com.rsa.cryptoj.o.pq.a(Unknown Source)
      2. com.rsa.cryptoj.o.pq.verify(Unknown Source)
      2 frames
    4. Android Platform
      JarVerifier$1.run
      1. javax.crypto.JarVerifier.testSignatures(JarVerifier.java:737)
      2. javax.crypto.JarVerifier.access$400(JarVerifier.java:34)
      3. javax.crypto.JarVerifier$1.run(JarVerifier.java:183)
      4. javax.crypto.JarVerifier$1.run(JarVerifier.java:149)
      4 frames
    5. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    6. Android Platform
      JarVerifier.<clinit>
      1. javax.crypto.JarVerifier.<clinit>(JarVerifier.java:148)
      1 frame