opnejdk8 with jamvm linker error
Rizwan
rizwan at celestialsys.com
Fri Dec 7 11:57:50 UTC 2018
Hi All,
Running a Java application using jamvm which links a third party library is
not able to link.
Java version used..
root at FX:/apps# java -jamvm -version
openjdk version "1.8.0_102"
OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-2-b14)
JamVM (build 2.0.0, inline-threaded interpreter with stack-caching)
root at FX:/apps#
I have set LD_LIBRARY_PATH correctly.
root at FX:~# echo $LD_LIBRARY_PATH
/platform/lib/
root at FX:~#
root at FX:~# java -jamvm -jar /apps/RFIDSampleApp1.jar
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.UnsatisfiedLinkError: RFID_Connect
at com.mot.rfid.api3.API3Natives.RFID_Connect(Native Method)
at com.mot.rfid.api3.API3Natives.Connect(API3Natives.java:595)
at com.mot.rfid.api3.RFIDReader.connect(RFIDReader.java:375)
at
org.zebra.RFIDSample4App.RFIDSample4App.connectToReader(RFIDSample4App.java:1517)
at org.zebra.RFIDSample4App.RFIDSample4App.<init>(RFIDSample4App.java:167)
at org.zebra.RFIDSample4App.RFIDSample4App.main(RFIDSample4App.java:1562)
... 5 more
root at FX:~#
While I am able to run a sample hello application...
root at FX:~# java -jamvm -jar /apps/hello.jar
Hello, World
Below is the verbose:jni log of linker error.
Dynamic-linking native method java.net.NetworkInterface.getMacAddr0 ... JNI]
[Dynamic-linking native method sun.misc.Unsafe.copyMemory ... internal]
[Dynamic-linking native method sun.misc.Unsafe.putByte ... internal]
[Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.opendir0 ...
JNI]
[Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.readdir ...
JNI]
[Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.closedir ...
JNI]
[Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.open0 ...
JNI]
[Dynamic-linking native method sun.nio.ch.IOUtil.initIDs ... JNI]
[Dynamic-linking native method sun.nio.ch.IOUtil.iovMax ... JNI]
[Dynamic-linking native method sun.nio.ch.FileChannelImpl.initIDs ... JNI]
[Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.init ... JNI]
[Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.close0 ... JNI]
[Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.lstat0 ...
JNI]
[Dynamic-linking native method sun.nio.fs.UnixNativeDispatcher.unlink0 ...
JNI]
[Dynamic-linking native method sun.nio.ch.NativeThread.init ... JNI]
[Dynamic-linking native method sun.nio.ch.NativeThread.current ... JNI]
[Dynamic-linking native method sun.misc.Unsafe.pageSize ... internal]
[Dynamic-linking native method sun.misc.Unsafe.getLongVolatile ... internal]
[Dynamic-linking native method sun.misc.Unsafe.setMemory ... internal]
[Dynamic-linking native method sun.nio.ch.FileDispatcherImpl.write0 ... JNI]
[Dynamic-linking native method com.mot.rfid.api3.API3Natives.RFID_Connect
... ]
[Dynamic-linking native method java.io.FileOutputStream.writeBytes ... JNI]
Exception in thread "main" [Dynamic-linking native method
java.lang.System.identityHashCode ... JNI]
java.lang.reflect.InvocationTargetException
[Dynamic-linking native method java.lang.Throwable.getStackTraceDepth ...
JNI]
[Dynamic-linking native method java.lang.Throwable.getStackTraceElement ...
JNI]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.UnsatisfiedLinkError: RFID_Connect
at com.mot.rfid.api3.API3Natives.RFID_Connect(Native Method)
at com.mot.rfid.api3.API3Natives.Connect(API3Natives.java:595)
at com.mot.rfid.api3.RFIDReader.connect(RFIDReader.java:375)
at
org.zebra.RFIDSample4App.RFIDSample4App.connectToReader(RFIDSample4App.java:1517)
at org.zebra.RFIDSample4App.RFIDSample4App.<init>(RFIDSample4App.java:167)
at org.zebra.RFIDSample4App.RFIDSample4App.main(RFIDSample4App.java:1562)
... 5 more
[Dynamic-linking native method java.io.UnixFileSystem.delete0 ... JNI]
root at FX:/apps#
I do not get the UnsatisfiedLinkError error with java "OpenJDK Zero VM
(build 25.102-b14, interpreted mode) "
root at FX:/apps# java -jar /apps/RFIDSampleApp1.jar
Connected to 127.0.0.1
..................................................
Welcome to RFID API3 Java Standard Sample Application
..................................................
Thanks
Rizwan
More information about the discuss
mailing list