Unable to restart Agent and receive java.lang.ExceptionInInitializerError when using Luna software

Document ID : KB000087899
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
Initializing JCE: AES 256
Exception in thread "main" java.lang.ExceptionInInitializerError

If Luna software is installed on a machine where an Applications Manager (AM) Agent is installed and you are unable to restart the Agent, check the AM AgentService log for error messages similar to the following.
 
Initializing JCE: AES 256
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.safenetinc.luna.LunaSlotManager.<init>(LunaSlotManager.java:62)
at com.safenetinc.luna.LunaSlotManager.getInstance(LunaSlotManager.java:133)
at com.safenetinc.luna.provider.keygen.LunaKeyGeneratorSecret.engineGenerateKey(LunaKeyGeneratorSecret.java:97)
at javax.crypto.KeyGenerator.generateKey(KeyGenerator.java:516)
at com.appworx.shared.code.server.C.A(ServerUtil2.java:89)
at com.appworx.shared.code.server.C.A(ServerUtil2.java:210)
at com.appworx.agent.AgentService.main(AgentService.java:987)
Caused by: com.safenetinc.luna.LunaException: Failed to load LunaAPI and LunaAPI_64 libraries
at com.safenetinc.luna.LunaAPI.<clinit>(LunaAPI.java:180)
... 7 more
Caused by: java.lang.UnsatisfiedLinkError: no LunaAPI_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
at java.lang.Runtime.loadLibrary0(Runtime.java:844)
at java.lang.System.loadLibrary(System.java:1051)
at com.safenetinc.luna.LunaAPI.<clinit>(LunaAPI.java:178)
... 7 more

These errors indicate that there is a configuration issue with the SafeNet Luna secure cryptographic operations software.  
 
Cause:
Cause type:
Other
Root Cause: Configuration issue with SafeNet Luna secure cryptographic operations software.
Resolution:
Contact SafeNet to futher troubleshoot the Luna software configuration.

Fix Status: No Fix

Fix Version(s):
N/A
Additional Information:
Workaround :
Comment out any lines in the Java security file that refer to the Luna software and restart the AM Agent.