| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| I compiled my jMultidev.jar and libhwAPI_64.so with 64bit. How to debug this error? $ java -jar jMultidev.jar Failed to load hwAPI and hwAPI_64 libraries. java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0_07/jre/lib/ ext/libhwAPI_64.so: ld.so.1: java: fatal: /usr/jdk/instances/ jdk1.6.0_07/jre/lib/ext/libhwAPI_64.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1660) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at com.mycomp.crypto.hwAPI. at com.mycomp.crypto.hwTokenManager. 101) at com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) at jMultidev.jMultidev. at jMultidev.jMultidev.main(jMultidev.java:805) 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. 107) at com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) at jMultidev.jMultidev. at jMultidev.jMultidev.main(jMultidev.java:805) OS is solaris 10 (SunOS 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500). $ java -version java version "1.6.0_07" Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) CC: WorkShop Compilers 5.0 02/10/08 C++ 5.0 Patch 107311-19 /opt/SUNWspro/bin/../SC5.0/bin/c++filt: WorkShop Compilers 5.0 02/10/08 C++ 5.0 Patch 107311-19 ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.477 |
|
#2
|
| TsanChung wrote: > I compiled my jMultidev.jar and libhwAPI_64.so with 64bit. > How to debug this error? > $ java -jar jMultidev.jar > Failed to load hwAPI and hwAPI_64 libraries. > java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0_07/jre/lib/ > ext/libhwAPI_64.so: ld.so.1: java: fatal: /usr/jdk/instances/ > jdk1.6.0_07/jre/lib/ext/libhwAPI_64.so: wrong ELF class: ELFCLASS64 > (Possible cause: architecture word width mismatch) > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1751) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1660) > at java.lang.Runtime.loadLibrary0(Runtime.java:823) > at java.lang.System.loadLibrary(System.java:1030) > at com.mycomp.crypto.hwAPI. > at com.mycomp.crypto.hwTokenManager. > 101) > at > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > at jMultidev.jMultidev. > at jMultidev.jMultidev.main(jMultidev.java:805) > 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. > 107) > at > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > at jMultidev.jMultidev. > at jMultidev.jMultidev.main(jMultidev.java:805) > > > > OS is solaris 10 (SunOS 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500). > > $ java -version > java version "1.6.0_07" > Java(TM) SE Runtime Environment (build 1.6.0_07-b06) > Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) > > CC: WorkShop Compilers 5.0 02/10/08 C++ 5.0 Patch 107311-19 > /opt/SUNWspro/bin/../SC5.0/bin/c++filt: WorkShop Compilers 5.0 > 02/10/08 C++ 5.0 Patch 107311-19 > ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.477 You cannot compile java sources for 64bit. They are independent of 32 or 64bit. Try java -d64 -jar jMultidev.jar to force the use of the 64bit JVM. |
|
#3
|
| Hi, On 26 Aug., 23:24, TsanChung > I compiled my jMultidev.jar and libhwAPI_64.so with 64bit. > How to debug this error? > $ java *-jar jMultidev.jar > Failed to load hwAPI and hwAPI_64 libraries. > java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0_07/jre/lib/ > ext/libhwAPI_64.so: ld.so.1: java: fatal: /usr/jdk/instances/ > jdk1.6.0_07/jre/lib/ext/libhwAPI_64.so: wrong ELF class: ELFCLASS64 > (Possible cause: architecture word width mismatch) > * * * * at java.lang.ClassLoader$NativeLibrary.load(Native Method) > * * * * at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1751) > * * * * at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1660) > * * * * at java.lang.Runtime.loadLibrary0(Runtime.java:823) > * * * * at java.lang.System.loadLibrary(System.java:1030) > * * * * at com.mycomp.crypto.hwAPI. > * * * * at com.mycomp.crypto.hwTokenManager. > 101) > * * * * at > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > * * * * at jMultidev.jMultidev. > * * * * at jMultidev.jMultidev.main(jMultidev.java:805) > 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. > 107) > * * * * at > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > * * * * at jMultidev.jMultidev. > * * * * at jMultidev.jMultidev.main(jMultidev.java:805) > > OS is solaris 10 (SunOS 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500). > > $ java -version > java version "1.6.0_07" > Java(TM) SE Runtime Environment (build 1.6.0_07-b06) > Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) > > CC: WorkShop Compilers 5.0 02/10/08 C++ 5.0 Patch 107311-19 > /opt/SUNWspro/bin/../SC5.0/bin/c++filt: WorkShop Compilers 5.0 > 02/10/08 C++ 5.0 Patch 107311-19 > ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.477 I've no experience with a shared object in java, but from the error mesage I would say, that the JVM is running in 32 bit mode and your lib is 64 bit. HTH Ewald |
|
#4
|
| On Aug 26, 6:25*pm, Frank Langelage > TsanChung wrote: > > I compiled my jMultidev.jar and libhwAPI_64.so with 64bit. > > How to debug this error? > > $ java *-jar jMultidev.jar > > Failed to load hwAPI and hwAPI_64 libraries. > > java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0_07/jre/lib/ > > ext/libhwAPI_64.so: ld.so.1: java: fatal: /usr/jdk/instances/ > > jdk1.6.0_07/jre/lib/ext/libhwAPI_64.so: wrong ELF class: ELFCLASS64 > > (Possible cause: architecture word width mismatch) > > * * * * at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > * * * * at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1751) > > * * * * at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1660) > > * * * * at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > * * * * at java.lang.System.loadLibrary(System.java:1030) > > * * * * at com.mycomp.crypto.hwAPI. > > * * * * at com.mycomp.crypto.hwTokenManager. > > 101) > > * * * * at > > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > > * * * * at jMultidev.jMultidev. > > * * * * at jMultidev.jMultidev.main(jMultidev.java:805) > > 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. > > 107) > > * * * * at > > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > > * * * * at jMultidev.jMultidev. > > * * * * at jMultidev.jMultidev.main(jMultidev.java:805) > > > OS is solaris 10 (SunOS 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500). > > > $ java -version > > java version "1.6.0_07" > > Java(TM) SE Runtime Environment (build 1.6.0_07-b06) > > Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) > > > CC: WorkShop Compilers 5.0 02/10/08 C++ 5.0 Patch 107311-19 > > /opt/SUNWspro/bin/../SC5.0/bin/c++filt: WorkShop Compilers 5.0 > > 02/10/08 C++ 5.0 Patch 107311-19 > > ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.477 > > You cannot compile java sources for 64bit. > They are independent of 32 or 64bit. > > Try > * * java -d64 -jar jMultidev.jar > to force the use of the 64bit JVM. $ java -d64 -jar jMultidev.jar Failed to load function 'CA_GetHAStatus'. Exception in thread "main" com.mycomp.crypto.hwCryptokiException: function 'CrystokiConnect failed' returns 0x0 at com.mycomp.crypto.hwCryptokiException.ThrowNew(hwC ryptokiException.java: 57) at com.mycomp.crypto.hwAPI.Initialize(Native Method) at com.mycomp.crypto.hwTokenManager. 107) at com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) at jMultidev.jMultidev. at jMultidev.jMultidev.main(jMultidev.java:805) However, the same source code works on a 64 bit linux computer (Linux 2.6.9-67.EL #1 Wed Nov 7 13:43:31 EST 2007 x86_64 x86_64 x86_64 GNU/ Linux). java -d64 -jar jMultidev.jar java -jar jMultidev.jar Because java is write once, run everywhere, so I copy the jar files from the linux computer to the solaris computer. However, java -d64 -jar jMultidev.jar java -jar jMultidev.jar both fails. What is the problem? Is it in libhwAPI_64.so? |
|
#5
|
| Hi, On 27 Aug., 16:11, TsanChung > On Aug 26, 6:25*pm, Frank Langelage > > > TsanChung wrote: > > > I compiled my jMultidev.jar and libhwAPI_64.so with 64bit. > > > How to debug this error? > > > $ java *-jar jMultidev.jar > > > Failed to load hwAPI and hwAPI_64 libraries. > > > java.lang.UnsatisfiedLinkError: /usr/jdk/instances/jdk1.6.0_07/jre/lib/ > > > ext/libhwAPI_64.so: ld.so.1: java: fatal: /usr/jdk/instances/ > > > jdk1.6.0_07/jre/lib/ext/libhwAPI_64.so: wrong ELF class: ELFCLASS64 > > > (Possible cause: architecture word width mismatch) > > > * * * * at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > * * * * at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1751) > > > * * * * at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1660) > > > * * * * at java.lang.Runtime.loadLibrary0(Runtime.java:823) > > > * * * * at java.lang.System.loadLibrary(System.java:1030) > > > * * * * at com.mycomp.crypto.hwAPI. > > > * * * * at com.mycomp.crypto.hwTokenManager. > > > 101) > > > * * * * at > > > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > > > * * * * at jMultidev.jMultidev. > > > * * * * at jMultidev.jMultidev.main(jMultidev.java:805) > > > 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. > > > 107) > > > * * * * at > > > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > > > * * * * at jMultidev.jMultidev. > > > * * * * at jMultidev.jMultidev.main(jMultidev.java:805) > > > > OS is solaris 10 (SunOS 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500).. > > > > $ java -version > > > java version "1.6.0_07" > > > Java(TM) SE Runtime Environment (build 1.6.0_07-b06) > > > Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) > > > > CC: WorkShop Compilers 5.0 02/10/08 C++ 5.0 Patch 107311-19 > > > /opt/SUNWspro/bin/../SC5.0/bin/c++filt: WorkShop Compilers 5.0 > > > 02/10/08 C++ 5.0 Patch 107311-19 > > > ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.477 > > > You cannot compile java sources for 64bit. > > They are independent of 32 or 64bit. > > > Try > > * * java -d64 -jar jMultidev.jar > > to force the use of the 64bit JVM. > > $ java -d64 -jar jMultidev.jar > Failed to load function 'CA_GetHAStatus'. > Exception in thread "main" com.mycomp.crypto.hwCryptokiException: > function 'CrystokiConnect failed' returns 0x0 > * * * * at > com.mycomp.crypto.hwCryptokiException.ThrowNew(hwC ryptokiException.java: > 57) > * * * * at com.mycomp.crypto.hwAPI.Initialize(Native Method) > * * * * at com.mycomp.crypto.hwTokenManager. > 107) > * * * * at > com.mycomp.crypto.hwTokenManager.getInstance(hwTok enManager.java:62) > * * * * at jMultidev.jMultidev. > * * * * at jMultidev.jMultidev.main(jMultidev.java:805) > > However, the same source code works on a 64 bit linux computer (Linux > 2.6.9-67.EL #1 Wed Nov 7 13:43:31 EST 2007 x86_64 x86_64 x86_64 GNU/ > Linux). > java -d64 -jar jMultidev.jar > java -jar jMultidev.jar > > Because java is write once, run everywhere, so I copy the jar files > from the linux computer to the solaris computer. > However, > java -d64 -jar jMultidev.jar > java -jar jMultidev.jar > both fails. > > What is the problem? > Is it in libhwAPI_64.so? How do you get the Interface to the libhwAPI_64.so library?. Is it over JNI? I have not done such a thing, but perhaps there is a problem in the generated interface's calling the Shared Object methods? |
![]() |
| Thread Tools | |
| Display Modes | |