Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have implemented a test unit to load Luna keystore but something is wrong when i try to initialize the "LunaTokenManager":

public static void main(String[] args) {
  try {
    LunaTokenManager tokenManager = LunaTokenManager.getInstance();
  } catch (Throwable t) {
    t.printStackTrace();
  }
}

i got the following message:

java.lang.UnsatisfiedLinkError: com.chrysalisits.crypto.LunaAPI.Initialize()V
at com.chrysalisits.crypto.LunaAPI.Initialize(Native Method)
at com.chrysalisits.crypto.LunaTokenManager.<init>(LunaTokenManager.java:107)
at com.chrysalisits.crypto.LunaTokenManager.getInstance(LunaTokenManager.java:62)
at it.tasgroup.eacs.service.TestKeystoreWithLunaSA.main(TestKeystoreWithLunaSA.java:14)

LunaApi.ddl is placed in C:Program FilesLunaSAJSPlib Provider.jar is placed in the %JAVA_HOME%libext both path are configured in environment variables

the two jar "LunaJCASP-1.0.0.jar" and "LunaJCESP-1.0.0.jar" are included as lib into eclipse buildpath

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
729 views
Welcome To Ask or Share your Answers For Others

1 Answer

Two possible solutions: 1.- You're not specifying correctly the path to your libraries. 2.- Permissions issue between your process and the library directory


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...