You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application there are several libraries, which use JNI to do their job. After upgrade AdoptOpenJDK to 11.0.4+11.2, all those JNI calls result with exceptions.
Need to admin, that AdoptOpenJDK 11.0.3+7 works fine, so it looks like issue is specifically in 11.0.4.
In order to illustrate problem, I created simple app (I used JNA for simplification) and ran it different versions of AdoptOpenJDK.
Results:
OS X (macOS Mojave 10.14.6)
1.8.0_212, x86_64: "AdoptOpenJDK 8"
$ java -Djna.debug_load=true -Djna.debug_load.jna=true -jar target/jnatest-1.0-SNAPSHOT.jar osx
Aug 14, 2019 1:23:07 AM com.sun.jna.Native extractFromResourcePath
INFO: Looking in classpath from sun.misc.Launcher$AppClassLoader@3d4eac69 for /com/sun/jna/darwin/libjnidispatch.jnilib
Aug 14, 2019 1:23:07 AM com.sun.jna.Native extractFromResourcePath
INFO: Found library resource at jar:file:/Users/mfedoryshyn/Projects/Other/jnatest/target/lib/jna-5.4.0.jar!/com/sun/jna/darwin/libjnidispatch.jnilib
Aug 14, 2019 1:23:07 AM com.sun.jna.Native extractFromResourcePath
INFO: Extracting library to /Users/mfedoryshyn/Library/Caches/JNA/temp/jna3251882057131132647.tmp
Aug 14, 2019 1:23:07 AM com.sun.jna.Native loadNativeDispatchLibraryFromClasspath
INFO: Trying /Users/mfedoryshyn/Library/Caches/JNA/temp/jna3251882057131132647.tmp
Aug 14, 2019 1:23:07 AM com.sun.jna.Native loadNativeDispatchLibraryFromClasspath
INFO: Found jnidispatch at /Users/mfedoryshyn/Library/Caches/JNA/temp/jna3251882057131132647.tmp
Aug 14, 2019 1:23:07 AM com.sun.jna.NativeLibrary loadLibrary
INFO: Looking for library 'System'
Aug 14, 2019 1:23:07 AM com.sun.jna.NativeLibrary loadLibrary
INFO: Adding paths from jna.library.path: null
Aug 14, 2019 1:23:07 AM com.sun.jna.NativeLibrary loadLibrary
INFO: Trying libSystem.dylib
Aug 14, 2019 1:23:07 AM com.sun.jna.NativeLibrary loadLibrary
INFO: Found library 'System' at libSystem.dylib
[main] INFO com.myapp.App - -------------------------
[main] INFO com.myapp.App - Available pages: 3538661
11.0.3, x86_64: "AdoptOpenJDK 11" (11.0.3+7)
$ java -Djna.debug_load=true -Djna.debug_load.jna=true -jar target/jnatest-1.0-SNAPSHOT.jar osx
Aug. 14, 2019 1:07:28 AM com.sun.jna.Native extractFromResourcePath
INFO: Looking in classpath from jdk.internal.loader.ClassLoaders$AppClassLoader@799f7e29 for /com/sun/jna/darwin/libjnidispatch.jnilib
Aug. 14, 2019 1:07:28 AM com.sun.jna.Native extractFromResourcePath
INFO: Found library resource at jar:file:/Users/mfedoryshyn/Projects/Other/jnatest/target/lib/jna-5.4.0.jar!/com/sun/jna/darwin/libjnidispatch.jnilib
Aug. 14, 2019 1:07:28 AM com.sun.jna.Native extractFromResourcePath
INFO: Extracting library to /Users/mfedoryshyn/Library/Caches/JNA/temp/jna9373615060199068285.tmp
Aug. 14, 2019 1:07:28 AM com.sun.jna.Native loadNativeDispatchLibraryFromClasspath
INFO: Trying /Users/mfedoryshyn/Library/Caches/JNA/temp/jna9373615060199068285.tmp
Aug. 14, 2019 1:07:28 AM com.sun.jna.Native loadNativeDispatchLibraryFromClasspath
INFO: Found jnidispatch at /Users/mfedoryshyn/Library/Caches/JNA/temp/jna9373615060199068285.tmp
Aug. 14, 2019 1:07:28 AM com.sun.jna.NativeLibrary loadLibrary
INFO: Looking for library 'System'
Aug. 14, 2019 1:07:28 AM com.sun.jna.NativeLibrary loadLibrary
INFO: Adding paths from jna.library.path: null
Aug. 14, 2019 1:07:28 AM com.sun.jna.NativeLibrary loadLibrary
INFO: Trying libSystem.dylib
Aug. 14, 2019 1:07:28 AM com.sun.jna.NativeLibrary loadLibrary
INFO: Found library 'System' at libSystem.dylib
[main] INFO com.myapp.App - -------------------------
[main] INFO com.myapp.App - Available pages: 3447488
$ java -Djna.debug_load=true -Djna.debug_load.jna=true -jar target/jnatest-1.0-SNAPSHOT.jar osx
Aug. 14, 2019 1:24:55 AM com.sun.jna.Native extractFromResourcePath
INFO: Looking in classpath from jdk.internal.loader.ClassLoaders$AppClassLoader@4b85612c for /com/sun/jna/darwin/libjnidispatch.jnilib
Aug. 14, 2019 1:24:55 AM com.sun.jna.Native extractFromResourcePath
INFO: Found library resource at jar:file:/Users/mfedoryshyn/Projects/Other/jnatest/target/lib/jna-5.4.0.jar!/com/sun/jna/darwin/libjnidispatch.jnilib
Aug. 14, 2019 1:24:55 AM com.sun.jna.Native extractFromResourcePath
INFO: Extracting library to /Users/mfedoryshyn/Library/Caches/JNA/temp/jna9413857741581317107.tmp
Aug. 14, 2019 1:24:55 AM com.sun.jna.Native loadNativeDispatchLibraryFromClasspath
INFO: Trying /Users/mfedoryshyn/Library/Caches/JNA/temp/jna9413857741581317107.tmp
[main] ERROR com.myapp.App - Major error:
java.lang.UnsatisfiedLinkError: /Users/mfedoryshyn/Library/Caches/JNA/temp/jna9413857741581317107.tmp: dlopen(/Users/mfedoryshyn/Library/Caches/JNA/temp/jna9413857741581317107.tmp, 1): no suitable image found. Did find:
/Users/mfedoryshyn/Library/Caches/JNA/temp/jna9413857741581317107.tmp: code signature in (/Users/mfedoryshyn/Library/Caches/JNA/temp/jna9413857741581317107.tmp) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2617)
at java.base/java.lang.Runtime.load0(Runtime.java:767)
at java.base/java.lang.System.load(System.java:1831)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
at com.sun.jna.Native.<clinit>(Native.java:195)
at com.sun.jna.Structure.setAlignType(Structure.java:280)
at com.sun.jna.Structure.<init>(Structure.java:197)
at com.sun.jna.Structure.<init>(Structure.java:193)
at com.sun.jna.Structure.<init>(Structure.java:180)
at com.sun.jna.Structure.<init>(Structure.java:172)
at com.sun.jna.platform.mac.SystemB$VMStatistics.<init>(SystemB.java:111)
at com.myapp.MacOSMemoryStats.stat(App.java:72)
at com.myapp.MacOSMemoryStats.stat(App.java:64)
at com.myapp.App.main(App.java:48)
I also checked Windows (Microsoft Windows Server 2019 Datacenter), but it seems it works fine on PC.
Please describe the issue that you are having with our binaries and if possible how to recreate it.
The text was updated successfully, but these errors were encountered:
Platform:
OS X (macOS Mojave 10.14.6)
In my application there are several libraries, which use JNI to do their job. After upgrade AdoptOpenJDK to 11.0.4+11.2, all those JNI calls result with exceptions.
Need to admin, that AdoptOpenJDK 11.0.3+7 works fine, so it looks like issue is specifically in 11.0.4.
In order to illustrate problem, I created simple app (I used JNA for simplification) and ran it different versions of AdoptOpenJDK.
Results:
OS X (macOS Mojave 10.14.6)
1.8.0_212, x86_64: "AdoptOpenJDK 8"
11.0.3, x86_64: "AdoptOpenJDK 11" (11.0.3+7)
11.0.4, x86_64: "AdoptOpenJDK 11" (11.0.4+11)
(openjdk 11.0.4 2019-07-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11))
I also checked Windows (Microsoft Windows Server 2019 Datacenter), but it seems it works fine on PC.
Please describe the issue that you are having with our binaries and if possible how to recreate it.
The text was updated successfully, but these errors were encountered: