java.lang.ExceptionInInitializerError

GitHub | Joiningmoney26 | 4 months 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

    HI, We have this error message when we try to log in confluence: Cause java.lang.NullPointerException at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:721) Stack Trace:[hide] java.lang.NullPointerException at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:721) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) LOG ERROR Exception in thread "Timeout guard" java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity at javax.crypto.Cipher.getInstance(Cipher.java:499) at sun.security.ssl.JsseJce.getCipher(JsseJce.java:224) at sun.security.ssl.CipherBox.<init>(CipherBox.java:150) at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208) at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:467) at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:507) at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:485) at sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:190) at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:342) at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:300) at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:576) at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:446) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:140) at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82) at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$1.doit(ControllerThreadSocketFactory.java:91) at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$SocketTask.run(ControllerThreadSocketFactory.java:158) at java.lang.Thread.run(Thread.java:745) Thanks for your help

    Atlassian JIRA | 3 years ago | Johann Pirsel
    java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity
  2. 0

    HI, We have this error message when we try to log in confluence: Cause java.lang.NullPointerException at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:721) Stack Trace:[hide] java.lang.NullPointerException at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:721) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) LOG ERROR Exception in thread "Timeout guard" java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity at javax.crypto.Cipher.getInstance(Cipher.java:499) at sun.security.ssl.JsseJce.getCipher(JsseJce.java:224) at sun.security.ssl.CipherBox.<init>(CipherBox.java:150) at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208) at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:467) at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:507) at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:485) at sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:190) at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:342) at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:300) at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:576) at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:446) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:140) at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82) at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$1.doit(ControllerThreadSocketFactory.java:91) at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$SocketTask.run(ControllerThreadSocketFactory.java:158) at java.lang.Thread.run(Thread.java:745) Thanks for your help

    Atlassian JIRA | 3 years ago | Johann Pirsel
    java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity
  3. 0

    FULL PRODUCT VERSION : Java HotSpot(TM) 64-Bit Server VM (build 25.102-b04, mixed mode) ADDITIONAL OS VERSION INFORMATION : windows 10 64 A DESCRIPTION OF THE PROBLEM : simple connect https website,it could not work when use utf-16 in source file REGRESSION. Last worked in version 8u74 STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : public class Test { public static void main(String[] args) throws Exception { URLConnection openConnection = new URL("https://www.google.com").openConnection(); openConnection.connect(); } } EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - simple code above,if save as utf-8,it runs ok,if save as utf-16,it crash ACTUAL - report error ERROR MESSAGES/STACK TRACES THAT OCCUR : Exception in thread "main" java.lang.ExceptionInInitializerError at javax.crypto.JceSecurity.loadPolicies(JceSecurity.java:317) at javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:262) at javax.crypto.JceSecurity.access$000(JceSecurity.java:48) at javax.crypto.JceSecurity$1.run(JceSecurity.java:80) at java.security.AccessController.doPrivileged(Native Method) at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:77) at javax.crypto.JceSecurityManager.<clinit>(JceSecurityManager.java:65) at javax.crypto.Cipher.getConfiguredPermission(Cipher.java:2587) at javax.crypto.Cipher.getMaxAllowedKeyLength(Cipher.java:2611) at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:548) at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:527) at sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:194) at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:346) at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:304) at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:626) at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:537) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:72) at sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:405) at sun.net.NetworkClient.doConnect(NetworkClient.java:162) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) at Test.main(Test.java:7) Caused by: java.lang.SecurityException: Framework jar verification can not be initialized at javax.crypto.JarVerifier.<clinit>(JarVerifier.java:192) ... 29 more Caused by: java.security.PrivilegedActionException: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: java.lang.IllegalArgumentException: Illegal base64 character -2 at java.security.AccessController.doPrivileged(Native Method) at javax.crypto.JarVerifier.<clinit>(JarVerifier.java:151) ... 29 more Caused by: java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: java.lang.IllegalArgumentException: Illegal base64 character -2 at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:110) at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339) at javax.crypto.JarVerifier.parseCertificate(JarVerifier.java:206) at javax.crypto.JarVerifier.access$100(JarVerifier.java:37) at javax.crypto.JarVerifier$1.run(JarVerifier.java:158) at javax.crypto.JarVerifier$1.run(JarVerifier.java:152) ... 31 more Caused by: java.io.IOException: java.lang.IllegalArgumentException: Illegal base64 character -2 at sun.security.util.Pem.decode(Pem.java:49) at sun.security.provider.X509Factory.readOneBlock(X509Factory.java:638) at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:96) ... 36 more Caused by: java.lang.IllegalArgumentException: Illegal base64 character -2 at java.util.Base64$Decoder.decode0(Base64.java:714) at java.util.Base64$Decoder.decode(Base64.java:526) at sun.security.util.Pem.decode(Pem.java:47) ... 38 more REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- public class Test { public static void main(String[] args) throws Exception { URLConnection openConnection = new URL("https://www.google.com").openConnection(); openConnection.connect(); } } ---------- END SOURCE ----------

    JDK Bug System | 11 months ago | Webbug Group
    java.lang.ExceptionInInitializerError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    3 unregistered visitors
    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.lang.SecurityException

      Cannot locate policy or framework files!

      at javax.crypto.JceSecurity.setupJurisdictionPolicies()
    2. Android Platform
      JceSecurity$1.run
      1. javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:255)
      2. javax.crypto.JceSecurity.access$000(JceSecurity.java:48)
      3. javax.crypto.JceSecurity$1.run(JceSecurity.java:80)
      3 frames
    3. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    4. Android Platform
      Cipher.getMaxAllowedKeyLength
      1. javax.crypto.JceSecurity.<clinit>(JceSecurity.java:77)
      2. javax.crypto.JceSecurityManager.<clinit>(JceSecurityManager.java:65)
      3. javax.crypto.Cipher.getConfiguredPermission(Cipher.java:2587)
      4. javax.crypto.Cipher.getMaxAllowedKeyLength(Cipher.java:2611)
      4 frames
    5. Java JSSE
      SSLSocketFactoryImpl.createSocket
      1. sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:548)
      2. sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:527)
      3. sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:194)
      4. sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:346)
      5. sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:304)
      6. sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:626)
      7. sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:537)
      8. sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:72)
      8 frames
    6. Java RT
      HttpsURLConnectionImpl.getInputStream
      1. sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:405)
      2. sun.net.NetworkClient.doConnect(NetworkClient.java:162)
      3. sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
      4. sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
      5. sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
      6. sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
      7. sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
      8. sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
      9. sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1022)
      10. sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1020)
      11. java.security.AccessController.doPrivileged(Native Method)
      12. java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782)
      13. sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1019)
      14. sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
      15. sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
      16. sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:91)
      17. sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1466)
      18. sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1464)
      19. java.security.AccessController.doPrivileged(Native Method)
      20. java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782)
      21. sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1463)
      22. sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
      22 frames
    7. Netty
      Bootstrap.<clinit>
      1. io.netty.bootstrap.Bootstrap.<clinit>(Bootstrap.java:263)
      1 frame
    8. Minecraft
      NetworkManager.func_150722_a
      1. net.minecraft.network.NetworkManager.func_150722_a(NetworkManager.java:277)
      1 frame
    9. MC Client
      Main.main
      1. net.minecraft.client.Minecraft.func_71371_a(Minecraft.java:2137)
      2. net.minecraft.client.gui.GuiCreateWorld.func_146284_a(GuiCreateWorld.java:230)
      3. net.minecraft.client.gui.GuiScreen.func_73864_a(GuiScreen.java:225)
      4. net.minecraft.client.gui.GuiCreateWorld.func_73864_a(GuiCreateWorld.java:377)
      5. net.minecraft.client.gui.GuiScreen.func_146274_d(GuiScreen.java:296)
      6. net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:268)
      7. net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1640)
      8. net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:973)
      9. net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:898)
      10. net.minecraft.client.main.Main.main(SourceFile:148)
      10 frames
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    11. Minecraft
      Launch.main
      1. net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
      2. net.minecraft.launchwrapper.Launch.main(Launch.java:28)
      2 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    13. MultiMC Launcher
      EntryPoint.main
      1. org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:310)
      2. org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:395)
      3. org.multimc.EntryPoint.listen(EntryPoint.java:170)
      4. org.multimc.EntryPoint.main(EntryPoint.java:54)
      4 frames