Description
I've observed that while running the snappy in the IBM AIX 7.2 it gives the error,
Exception in thread "main" org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY] no native library is found for os.name=AIX and os.arch=ppc64
at org.xerial.snappy.SnappyLoader.findNativeLibrary(SnappyLoader.java:345)
at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:179)
at org.xerial.snappy.SnappyLoader.loadSnappyApi(SnappyLoader.java:157)
at org.xerial.snappy.Snappy.init(Snappy.java:70)
at org.xerial.snappy.Snappy.<clinit>(Snappy.java:47)
I've tried to find the RCA, to do so I've first manually put the aix related native libraries and passed them as variables
jdk/bin/./java -Dorg.xerial.snappy.lib.path=/tmp -Dorg.xerial.snappy.lib.name=libsnappyjava.a -cp Demo.jar:lib/* com.demo.Bootstrap
And it worked! So I tried to find that by default (if we're not passing any variable) why it's not able to find that file?
So I've added a print statement and tried to debug, there I've noticed that it tries to find the file at the correct destination, But what I've noticed is that the file extension is different.
has resource /org/xerial/snappy/native/AIX/ppc64/libsnappyjava.so
And the native file that is present in the jar have a different file extension,
total 264
-rw-r--r-- 1 root root 266695 Aug 7 05:49 libsnappyjava.a
root@demo:/demo/snappy/org/xerial/snappy/native/AIX/ppc64#
And in the code, the file's extension is entirely dependent on the System class, And the System class it self returns the .so extension instead of .a and this extension issue is also a very popular issue.
So what's the correct extension?? Is there no alternate way than passing the variable??