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

Offen
#603 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
java
Bereich
backend

Rechercherichtung

Start by reading SnappyLoader.findNativeLibrary and loadNativeLibrary, especially the platform-specific library name and extension handling mentioned in the report. Check how the AIX/ppc64 native library is packaged and compare that path with the loader’s lookup; run the relevant tests for native library loading. Done means the default lookup can load the packaged AIX library without requiring custom system properties.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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??

Vorherrschende Sprache
Java
Sterne
1.1k
Forks
261
Ø Merge
2 Min.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus xerial/snappy-java

Alle Issues in xerial/snappy-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.