java.lang.UnsatisfiedLinkError: no HwAPI_64 in java.library.path forjdk 1.6 on hpux

Discussion in 'Java' started by TsanChung, Sep 4, 2008.

  1. TsanChung

    TsanChung Guest

    I had installed jdk 1.6 on hpux.
    I specified LD_LIBRARY_PATH and CLASSPATH on bash.
    I copied the libHwAPI.sl JNI shared library file to /opt/java6/jre/
    lib/ext.
    Please help to fix "no HwAPI_64 in java.library.path" error.

    $ java -version
    java version "1.5.0.08"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.08-
    _04_may_2007_06_31)
    Java HotSpot(TM) Server VM (build 1.5.0.08 jinteg:05.04.07-11:53 IA64,
    mixed mode)
    $ which java
    /usr/bin/java
    $ ls -ld /usr/bin/java
    lrwxr-xr-x 1 root sys 25 Mar 12 12:42 /usr/bin/
    java -> /opt/java1.5/jre/bin/java

    root# cd /usr/bin
    root# ls -l java
    lrwxr-xr-x 1 root sys 25 Mar 12 12:42 java -> /opt/
    java1.5/jre/bin/java
    root# rm java
    java: ? (y/n) y
    root# ln -s /opt/java6/jre/bin/java java

    $ ls -ld /usr/bin/java
    lrwxr-xr-x 1 root sys 23 Sep 4 17:38 /usr/bin/
    java -> /opt/java6/jre/bin/java
    $ java -version
    /usr/lib/dld.sl: Can't find path for shared library: libjli.sl
    /usr/lib/dld.sl: No such file or directory
    ARIES32: Core file for PA32 application saved to /home/twong/core.java
    ABORT instruction (core dumped)
    $ export SHLIB_PATH=/opt/java6/jre/lib/PA_RISC2.0/jli
    $ java -version
    java version "1.6.0.01"
    Java(TM) SE Runtime Environment (build 1.6.0.01-
    jinteg_06_jun_2008_13_24-b00)
    Java HotSpot(TM) Server VM (build 1.6.0.01 jinteg:06.07.08-04:50 IA64,
    mixed mode)

    $ cd JavaSP_dir/JavaSP/Samples/
    $ export CLASSPATH=/opt/java6/jre/lib/ext:.

    $ ls /opt/java6/jre/lib/ext
    HwJCASP.jar ibmpkcs.jar meta-index
    HwJCESP.jar libHwAPI.sl sunjce_provider.jar
    dnsns.jar localedata.jar sunpkcs11.jar
    $ export LD_LIBRARY_PATH=/opt/java6/jre/lib/ext:.
    $ java Certificate
    Failed to load HwAPI and HwAPI_64 libraries.
    java.lang.UnsatisfiedLinkError: no HwAPI_64 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    at com.mycomp.crypto.HwAPI.<clinit>(HwAPI.java:47)
    at com.mycomp.crypto.HwTokenManager.<init>(HwTokenManager.java:
    101)
    at
    com.mycomp.crypto.HwTokenManager.getInstance(HwTokenManager.java:62)
    at HSM_Manager.HSM_Login(HSM_Manager.java:35)
    at Certificate.main(Certificate.java:47)
    Exception in thread "main" java.lang.UnsatisfiedLinkError:
    com.mycomp.crypto.HwAPI.Initialize()V
    at com.mycomp.crypto.HwAPI.Initialize(Native Method)
    at com.mycomp.crypto.HwTokenManager.<init>(HwTokenManager.java:
    107)
    at
    com.mycomp.crypto.HwTokenManager.getInstance(HwTokenManager.java:62)
    at HSM_Manager.HSM_Login(HSM_Manager.java:35)
    at Certificate.main(Certificate.java:47)

    $ java -Djava.library.path=/opt/java6/jre/lib/ext Certificate
    will result in the same error.

    $ HP-UX hp1 B.11.31 U ia64
     
    TsanChung, Sep 4, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    36,218
    Roedy Green
    Sep 15, 2005
  2. MR
    Replies:
    1
    Views:
    663
    Roedy Green
    Oct 6, 2005
  3. shivaraj
    Replies:
    8
    Views:
    35,815
    antan_sw
    Nov 9, 2009
  4. gopinath511
    Replies:
    0
    Views:
    775
    gopinath511
    Jan 7, 2009
  5. gopinath511
    Replies:
    0
    Views:
    1,473
    gopinath511
    Jan 7, 2009
Loading...

Share This Page