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

T

TsanChung

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top