[Rpi Buster] JNA Native: java.lang.UnsatisfiedLinkError: Native library (libjnidispatch.so) not found

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
LHello,
After upgrading to Buster release, I realized that filebot was moving no more my TV shows in the correct folder.
I ran the sysinfo script that showed a problem with JNA Native but even after reinstalling it the problem was not solved.
This is the output
https://pastebin.com/Pjda2SuY
Can someone point me in the right direction please?
Thanks in advance,
Renato
Hello,
thanks for the reply.

Code: Select all

find /usr/lib '*jnidispatch*'
is not found on my rpi.
I installed it using the deb.sh you mentioned in your reply: trying to run it again gave me THIS I can't see any error.
libjnidispatch should be at this location according to the package file listing:

Code: Select all

/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.system.so
:arrow: https://packages.debian.org/buster/armh ... i/filelist
:!: If it's not there, then FileBot will not find it.
:arrow: I'd start by getting a file listing for the libjna-jni package that your distribution uses to see where they put the *.so file. You might have to ask in the Raspberry Pi forums on how to contact the package maintainers on issues where the Raspberry Pi package is different from the Debian package.
This is the command:

Code: Select all

[email protected]:~ $ find /usr/lib/arm-linux-gnueabihf/jni
/usr/lib/arm-linux-gnueabihf/jni
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so.6.0.0
/usr/lib/arm-linux-gnueabihf/jni/libjfxmedia.so
/usr/lib/arm-linux-gnueabihf/jni/libglassgtk3.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_common.so
/usr/lib/arm-linux-gnueabihf/jni/libavplugin.so
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so.6
/usr/lib/arm-linux-gnueabihf/jni/libsnappyjava.so
/usr/lib/arm-linux-gnueabihf/jni/libfxplugins.so
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so
/usr/lib/arm-linux-gnueabihf/jni/libjfxwebkit.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font_pango.so
/usr/lib/arm-linux-gnueabihf/jni/libdecora_sse.so
/usr/lib/arm-linux-gnueabihf/jni/libglassgtk2.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_es2.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_sw.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_iio.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.system.so
/usr/lib/arm-linux-gnueabihf/jni/libglass.so
/usr/lib/arm-linux-gnueabihf/jni/libgstreamer-lite.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font_freetype.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font.so
Thanks in advance,
Sorry. I'm out of ideas. Looks like everything is configured correctly. And the library is there. So it should work. Makes no sense to me.

Code: Select all

jna.boot.library.name: jnidispatch.system
jna.boot.library.path: /usr/lib/arm-linux-gnueabihf/jni
You could try googling for generic JNA debug advice. There's a few options you could try that might give you some insights on what JNA is trying to do step by step:

Code: Select all

export JAVA_OPTS="-Djna.debug_load=true -Djna.debug_load.jna=true"
filebot -script fn:sysinfo
 :!: find not being able to find a file that we know is there is also a hint, and very strange. You could try a few things with find to see what works and what doesn't. Perhaps find and JNA can't find the jnidispatch library for the same reason.
EDIT:
I also found some Debian-specific patches that seem to hardcode/replace the search path with arm-linux-gnueabi and thus actively break things on machines with less popular architectures:
* https://sources.debian.org/patches/libj ... -fs.patch/
* https://sources.debian.org/patches/libj ... ary.patch/
EDIT 2:
That patch also seems to hardcode /usr/lib/jni as search path. Check if a copy of libjnidispatch.system.so is there as well, and if not, copy it there.
Try setting jna.nosys=false and see if that makes things work:

Code: Select all

filebot -script fn:properties --def jna.nosys=false
filebot -script fn:sysinfo
hello,
i have been using filebot for years without problem but after upgrading to buster, my tvshows won't move in the correct folder.

Code: Select all

filebot -script fn:sysinfo
returns:

Code: Select all

FileBot 4.9.2 (r8046)
JNA Native: java.lang.UnsatisfiedLinkError: Can't obtain static method fromNative(Method, Object) from class com.sun.jna.Native
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
I can't find libjnidispatch.so via 

Code: Select all

find /usr/lib '*jnidispatch*'
but it seems at the right place

Code: Select all

find /usr/lib/arm-linux-gnueabihf/jni
/usr/lib/arm-linux-gnueabihf/jni
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch_3.2.7.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_es2.so
/usr/lib/arm-linux-gnueabihf/jni/libfxplugins.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_iio.so
/usr/lib/arm-linux-gnueabihf/jni/libglass.so
/usr/lib/arm-linux-gnueabihf/jni/libglassgtk3.so
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so.6
/usr/lib/arm-linux-gnueabihf/jni/libdecora_sse.so
/usr/lib/arm-linux-gnueabihf/jni/libjfxmedia.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch_4.2.2.so
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_common.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.system.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font_freetype.so
/usr/lib/arm-linux-gnueabihf/jni/libavplugin.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font_pango.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_sw.so
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so.6.0.0
/usr/lib/arm-linux-gnueabihf/jni/libjfxwebkit.so
/usr/lib/arm-linux-gnueabihf/jni/libglassgtk2.so
/usr/lib/arm-linux-gnueabihf/jni/libgstreamer-lite.so
and setting 

Code: Select all

filebot -script fn:properties --def jna.nosys=false
changes nothing...
i have the same sysenv as Polymar :?
i tried the portable version of filebot and the java error disappeared but my tvshows weren't moving in the correct folder either.
if something else pop on your mind :D
Thanks a lot
allright,
after renaming a subfolder from the download path from "films" to "temp" , my tvshows move at the right place. But using Filebot-portable. With the apt install, i'm still having the error

Code: Select all

FileBot 4.9.2 (r8046)
JNA Native: java.lang.UnsatisfiedLinkError: Can't obtain static method fromNative(Method, Object) from class com.sun.jna.Native
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
			
Well, apt shouldn't allow you to have different versions of the same package installed, yet here's libjnidispatch in triplicate, so dependency hell?

Code: Select all

/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch_3.2.7.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch_4.2.2.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.system.so

Code: Select all

find /usr/lib/arm-linux-gnueabihf/jni
/usr/lib/arm-linux-gnueabihf/jni
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_es2.so
/usr/lib/arm-linux-gnueabihf/jni/libfxplugins.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_iio.so
/usr/lib/arm-linux-gnueabihf/jni/libglass.so
/usr/lib/arm-linux-gnueabihf/jni/libglassgtk3.so
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so.6
/usr/lib/arm-linux-gnueabihf/jni/libdecora_sse.so
/usr/lib/arm-linux-gnueabihf/jni/libjfxmedia.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch_4.2.2.so
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_common.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.system.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font_freetype.so
/usr/lib/arm-linux-gnueabihf/jni/libavplugin.so
/usr/lib/arm-linux-gnueabihf/jni/libjavafx_font_pango.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.so
/usr/lib/arm-linux-gnueabihf/jni/libprism_sw.so
/usr/lib/arm-linux-gnueabihf/jni/libatk-wrapper.so.6.0.0
/usr/lib/arm-linux-gnueabihf/jni/libjfxwebkit.so
/usr/lib/arm-linux-gnueabihf/jni/libglassgtk2.so
/usr/lib/arm-linux-gnueabihf/jni/libgstreamer-lite.so
/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch_3.2.7.so
was just an old symlink.

Code: Select all

ls -l "/usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.so"
lrwxrwxrwx 1 root root 23 Oct 14 16:18 /usr/lib/arm-linux-gnueabihf/jni/libjnidispatch.so -> libjnidispatch_4.2.2.so
I tried removing via apt and reinstalling but it doesn't change anything. Should i reinstall java too?