-1

I am getting below exception while running my application.

Caused by: java.lang.UnsatisfiedLinkError: com.chrysalisits.crypto.LunaAPI.Initialize()V at com.chrysalisits.crypto.LunaAPI.Initialize(Native Method) at com.chrysalisits.crypto.LunaTokenManager.(LunaTokenManager.java:107) at com.chrysalisits.crypto.LunaTokenManager.getInstance(LunaTokenManager.java:62)

I have added LunaProvider.jar and libLunaAPI in $JAVA_HOME/jre/lib/ext.

anon
  • 855
  • 12
  • 22
Pawan
  • 1
  • 4

2 Answers2

0

I strongly recommend that you ask the HSM Support Team for help on this instead of Stackoverflow.

This error comes up if Java is not able to find the concerned .so / .dll (Library) file. Also, make sure that you have the correct 32 / 64 Bit version of the Library in the location.

That said, in the VM Arguments you could also set :

-Djava.library.path=/location_to_the_libLunaAPI_so_file (possibly, /usr/lunasa/JSP/lib .. or something)
Exception_al
  • 1,049
  • 1
  • 11
  • 21
  • Thanks for your reply. – Pawan Mar 03 '17 at 12:39
  • I have added libLunaAPI.so and LunaProvider.jar in java library path but error is still same – Pawan Mar 03 '17 at 12:41
  • Just put it (libLunaAPI.so) in the $JAVA_HOME/jre/lib ... see if that helps , also try $JRE_HOME/lib ... – Exception_al Mar 03 '17 at 13:21
  • @user1186213 in this link (http://stackoverflow.com/questions/27958755/using-safenet-luna-api-with-eclipse-lunatokenmanager) you said that you have solved the problem can you tell me please how you solved this one. – Pawan Mar 06 '17 at 10:58
0

I have solved my problem. Actual Problem was mismatch between native client library (libLunaAPI.so) and Luna client.

My application was using old library's com.chrysalisits.crypto.* classes to interact with Luna client however my Luna client got updated and functions which it exposed in its native library was not present in current library.

I updated my client application by using com.safenetinc.luna.* classes and latest client library.

Pawan
  • 1
  • 4