Confluence can not start or user can not log in due to javax.crypto.JceSecurity exception
症状
Confluence does not start, or user can not log in. The following appears in the atlassian-confluence.log
:
2014-09-29 09:42:04,048 ERROR [scheduler_Worker-9] [org.quartz.core.JobRunShell] run Job DirectoryPoller.1638401 threw an unhandled Exception:
java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.JceSecurity
at javax.crypto.KeyGenerator.nextSpi(KeyGenerator.java:324)
at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:157)
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:207)
...
catalina.out
に次のエラーが返される。
Sep 29, 2014 10:34:37 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.8-atlassian-13 01/23/2014 06:03 AM'
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)
...
原因
This issue occurs when the JAVA installation is corrupted and can not load some classes.
ソリューション
Download the JAVA installer from Oracle's site (check our supported platforms page to see which versions are supported), install it and update your JAVA_HOME variable to point to this new location. See this doc for more details about JAVA installation.
If starting Confluence via Windows service, check step two of the workaround section of this KB for instructions to how point the Windows service to a different JAVA installation.