[QNAP] Having Java library issues with portable filebot

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
SDub
Posts: 6
Joined: 15 Sep 2016, 02:27

[QNAP] Having Java library issues with portable filebot

Post by SDub »

I think the only filebot solution for me on a QNAP application is portable filebot, which is why I'm using it.

when running:

Code: Select all

filebot -script fn:sysinfo
my output is:

Code: Select all

FileBot 4.7.9 (r4984)
Java HotSpot(TM) Embedded Client VM warning: You have loaded library /share/CACHEDEV1_DATA/Download/Filebot/lib/x86_64/libjnidispatch.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
JNA Native: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-x86/libjnidispatch.so) not found in resource path ([file:/share/CACHEDEV1_DATA/Download/Filebot/FileBot.jar])
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load i386 (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
Apache Commons VFS: [zip, rar]
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_65
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 2 Core / 214 MB Max Memory / 8 MB Used Memory
OS: Linux (i386)
Package: PORTABLE
It seems like it's trying to load a 64bit library file in the first error. My OS claims to be i386 in this output. filebot.sh loads the libraries based on the output of "uname -m" which reports that my system is x86_64, so a 64 bit system. For fun, I replaced that line with:

Code: Select all

PACKAGE_LIBRARY_PATH="$APP_ROOT/lib/i686"
since there is no i386 libraries

and now when I run the sysinfo command, that first error goes away:

Code: Select all

[/share/CACHEDEV1_DATA/Download/Filebot] # filebot -script fn:sysinfo
FileBot 4.7.9 (r4984)
JNA Native: java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-x86/libjnidispatch.so) not found in resource path ([file:/share/CACHEDEV1_DATA/Download/Filebot/FileBot.jar])
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load i386 (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
Apache Commons VFS: [zip, rar]
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_65
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 2 Core / 214 MB Max Memory / 8 MB Used Memory
OS: Linux (i386)
Package: PORTABLE
uname: Linux NASty 3.12.6 #1 SMP Mon Mar 13 01:11:46 CST 2017 x86_64 unknown
Done ヾ(@⌒ー⌒@)ノ
But for whatever reason, it doesn't want to load libjnidispatch.so from that directory. So, I copied the i686 file into /usr/local/jre/lib/i386 (hoping on a prayer) and it still doesn't work. At this point, I feel like I've twisted my wires a bit and would like someone else's perspective as to what I might be doing wrong.
Last edited by SDub on 13 Sep 2017, 21:17, edited 1 time in total.
SDub
Posts: 6
Joined: 15 Sep 2016, 02:27

Re: [QNAP] Having Java library issues with portable filebot

Post by SDub »

OK, I just found a i386 version of libjnidispatch.so out of some JNA jar file and copied it over to /usr/local/jre/lib/i386 and now I get this for an output:

Code: Select all

[/share/Download/transmission/completed/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG] # filebot -script fn:sysinfo
FileBot 4.7.9 (r4984)
JNA Native: java.lang.ExceptionInInitializerError
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load i386 (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
Apache Commons VFS: [zip, rar]
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_144
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 2 Core / 214 MB Max Memory / 9 MB Used Memory
OS: Linux (i386)
Package: PORTABLE
uname: Linux NASty 3.12.6 #1 SMP Mon Mar 13 01:11:46 CST 2017 x86_64 unknown
Done ヾ(@⌒ー⌒@)ノ
BUT! It works now. When I download a torrent, the script is run and file is renamed and put in the correct spot, albeit some run time errors, which seems to be related to me missing a media info library file (or just not installing it at all because its not available on qnap):

Code: Select all

Locking /share/CACHEDEV1_DATA/Download/Filebot/data/logs/amc.log
Run script [fn:amc] at [Wed Sep 13 21:09:46 GMT 2017]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = .excludes
Parameter: ut_dir = /share/CACHEDEV1_DATA/Download/transmission/completed/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG
Parameter: ut_kind = multi
Parameter: ut_title = The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG
Parameter: subtitles = en
Use excludes: /share/CACHEDEV1_DATA/Multimedia/Media/.excludes (190)
Skip small video file: /share/CACHEDEV1_DATA/Download/transmission/completed/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG/ETRG.mp4
Ignore extra: /share/CACHEDEV1_DATA/Download/transmission/completed/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG/sample.avi
Input: /share/CACHEDEV1_DATA/Download/transmission/completed/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG.avi
Input: /share/CACHEDEV1_DATA/Download/transmission/completed/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG.srt
Group: [mov:the autopsy of jane doe 2016] => [The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG.avi, The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG.srt]
Get [English] subtitles for 1 files
CmdlineException: OpenSubtitles: Please enter your login details by calling `filebot -script fn:configure`
Rename movies using [TheMovieDB]
[MOVE] From [/share/CACHEDEV1_DATA/Download/transmission/completed/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG.avi] to [/share/CACHEDEV1_DATA/Multimedia/Media/Movies/The Autopsy of Jane Doe (2016)/The Autopsy of Jane Doe (2016).avi]
[MOVE] From [/share/CACHEDEV1_DATA/Download/transmission/completed/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG/The.Autopsy.of.Jane.Doe.2016.HDRip.XViD-ETRG.srt] to [/share/CACHEDEV1_DATA/Multimedia/Media/Movies/The Autopsy of Jane Doe (2016)/The Autopsy of Jane Doe (2016).eng.srt]
Processed 2 files
Fetching movie artwork for [The Autopsy of Jane Doe (2016)] to [/share/CACHEDEV1_DATA/Multimedia/Media/Movies/The Autopsy of Jane Doe (2016)]
Generate Movie NFO: The Autopsy of Jane Doe [397243]
NoClassDefFoundError: Could not initialize class net.filebot.mediainfo.MediaInfoLibrary
Fetching /share/CACHEDEV1_DATA/Multimedia/Media/Movies/The Autopsy of Jane Doe (2016)/poster.jpg => [posters/2000x3000, en, http://image.tmdb.org/t/p/original/hvQgtEMXzQZDCZkkLFPK6cO1FIy.jpg]
Fetching /share/CACHEDEV1_DATA/Multimedia/Media/Movies/The Autopsy of Jane Doe (2016)/fanart.jpg => [backdrops/1920x1080, http://image.tmdb.org/t/p/original/m4LtS8NoVvbl57mej9KBg9QT4fg.jpg]
Fetch failed: http://webservice.fanart.tv/v3/movies/397243?api_key=780b986b22c35e6f7a134a2f392c2deb
java.io.IOException: Response data is null: movies/397243 => http://webservice.fanart.tv/v3/movies/397243?api_key=780b986b22c35e6f7a134a2f392c2deb
        at net.filebot.CachedResource.lambda$get$1(CachedResource.java:96)
        at net.filebot.Cache.computeIf(Cache.java:90)
        at net.filebot.CachedResource.get(CachedResource.java:82)
        at net.filebot.web.FanartTVClient.getArtwork(FanartTVClient.java:45)
        at net.filebot.web.ArtworkProvider$getArtwork.call(Unknown Source)
        at Script2.fetchMovieFanart(Script2.groovy:237)
        at Script2$_fetchMovieArtworkAndNfo_closure12$_closure44.doCall(Script2.groovy:350)
        at Script2$_fetchMovieArtworkAndNfo_closure12.doCall(Script2.groovy:350)
        at Script2$_fetchMovieArtworkAndNfo_closure12.doCall(Script2.groovy)
        at net.filebot.cli.ScriptShellBaseClass.tryLogCatch(ScriptShellBaseClass.java:141)
        at Script2.fetchMovieArtworkAndNfo(Script2.groovy:330)
        at Script1$_run_closure55$_closure136.doCall(Script1.groovy:461)
        at Script1$_run_closure55.doCall(Script1.groovy:456)
        at Script1.run(Script1.groovy:412)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:64)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:119)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:115)

IOException: Response data is null: movies/397243 => http://webservice.fanart.tv/v3/movies/397243?api_key=780b986b22c35e6f7a134a2f392c2deb
Done ▒~C▒(▒| ▒~L~R▒~C▒▒~L~R▒| )▒~C~N
While it is working, I'd still appreciate some advice on how to maybe do this the right way.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [QNAP] Having Java library issues with portable filebot

Post by rednoah »

1.
libjnidispatch.so (JNA) doesn't work, so libmediainfo.so (MediaInfo) doesn't work:

Code: Select all

JNA Native: java.lang.ExceptionInInitializerError
:idea: FileBot will work just fine without MediaInfo, except MediaInfo bindings like {vf} or {af} won't work. The default {plex} format doesn't use them.


2.
fanart.tv services were down at the time:

Code: Select all

Fetch failed: http://webservice.fanart.tv/v3/movies/397243?api_key=780b986b22c35e6f7a134a2f392c2deb
:idea: This error in unrelated to JNA and MediaInfo.
:idea: Please read the FAQ and How to Request Help.
Post Reply