java-native-access / jna

Java Native Access
Other
8.56k stars 1.68k forks source link

JNA on IBM ZOS (OS/390) #1173

Open MacNale opened 4 years ago

MacNale commented 4 years ago

Trying to run Apache-cassandra on IBM z/OS USS environment. It fails to start with the following error - java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/z/os-s390x/libjnidispatch.so) not found in resource path. at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:866) ~[jna-4.2.2.jar:4.2.2-SNAPSHOT (b0)]

System architecture: OS/390 Java: java version "1.8.0_231" Java(TM) SE Runtime Environment (build 8.0.6.0 - pmz6480sr6-20191107_01(SR6)) IBM J9 VM (build 2.9, JRE 1.8.0 z/OS s390x-64-Bit Compressed References 20191106_432135 (JIT enabled, AOT enabled) OpenJ9 - f0b6be7 OMR - 18d8f94 IBM - 233dfb5) JCL - 20191016_01 based on Oracle jdk8u231-b10

Looking for IBM zOS port of the JNA library.

matthiasblaesing commented 4 years ago

@MacNale it will need someone with access to the hardware to make this happen. From experience I know, that is a major PITA if you don't have access to the architecture or only slow/very limited access.

MacNale commented 4 years ago

@matthiasblaesing I found libffi for z reference here - https://github.com/eclipse/openj9/tree/master/runtime/libffi/z

matthiasblaesing commented 4 years ago

@MacNale thank you for the info, however, the issue is larger: JNA will need constant access to a zos system, where the native library can be rebuild.

dbwiddis commented 3 years ago

There appear to be a few options available based on the answers to this StackOverflow question.