Aarch64 platform Java Error that amc script did not work

Support for Ubuntu and other Desktop Linux distributions
Post Reply
xuewy
Posts: 13
Joined: 06 Mar 2019, 14:06

Aarch64 platform Java Error that amc script did not work

Post by xuewy »

I have reinstalled filebot (4.8.5) on my linux box, my box is aarch64,

Code: Select all

root@Emby:/usr/bin# uname -m
aarch64
I first run

Code: Select all

apt-get install openjdk-8-jre
there is something missing, then I followed the instruction to use "--fix-broken install" to finish the Java 8 installation. Then I use the deb "FileBot_4.8.5_universal-jdk8.deb", it's successfully installed the filebot 4.8.5, run the command to show the filebot version as below:

Code: Select all

root@Emby:/usr/bin# filebot -version
FileBot 4.8.5 (r6216) / OpenJDK Runtime Environment 1.8.0_181 / Linux 5.0.0-aml-s905 (aarch64)
but when I run the sysinfo, it seems a lot of errors:

Code: Select all

root@Emby:/usr/lib/aarch64-linux-gnu# filebot -script fn:sysinfo
FileBot 4.8.5 (r6216)
JNA Native: groovy.lang.MissingPropertyException: No such property: com for class: Script1
Possible solutions: log, now
MediaInfo: java.lang.NoClassDefFoundError: Lcom/sun/jna/Pointer;
p7zip: p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,4 CPUs LE)
unrar: java.io.IOException: Cannot run program "unrar": error=2, No such file or directory
Chromaprint: groovy.lang.MissingMethodException: No signature of method: net.filebot.web.AcoustIDClient.version() is applicable for argument types: () values: []
Possible solutions: getIcon(), iterator(), every()
Extended Attributes: java.lang.NoClassDefFoundError: com/sun/jna/Platform
Unicode Filesystem: OK
Script Bundle: 2019-03-16 (r556)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_181
No such property: com for class: Script1
Possible solutions: log, now
groovy.lang.MissingPropertyException: No such property: com for class: Script1
Possible solutions: log, now
        at Script1.run(Script1.groovy:139)
        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:163)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:37)
        at net.filebot.Main.main(Main.java:132)

Error (o_O)
I also install below dependencies,but it still did not work

Code: Select all

apt-get install openjfx libjna-jni libmediainfo0v5 libchromaprint-tools p7zip-full p7zip-rar
Here is the result when I run

Code: Select all

find / -iname "*jnidispatch*"
no output.

Code: Select all

ls -l /usr/lib/*-linux-gnu*/jni
the output is

Code: Select all

root@Emby:/usr/bin# ls -l /usr/lib/*-linux-gnu*/jni
total 156
lrwxrwxrwx 1 root root    23 Feb 27  2018 libatk-wrapper.so -> libatk-wrapper.so.6.0.0
lrwxrwxrwx 1 root root    23 Feb 27  2018 libatk-wrapper.so.6 -> libatk-wrapper.so.6.0.0
-rw-r--r-- 1 root root 85120 Feb 27  2018 libatk-wrapper.so.6.0.0

Code: Select all

echo /usr/lib/*-linux-gnu*/jni
the output is

Code: Select all

root@Emby:/usr/bin# echo /usr/lib/*-linux-gnu*/jni
/usr/lib/aarch64-linux-gnu/jni
What should I do? It seems that if I use fn:amc, the script did not work due to Java error.

BR!
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Aarch64 platform Java Error that amc script did not work

Post by rednoah »

This should do the trick:

Code: Select all

sudo apt install libjna-java
:idea: Please read the FAQ and How to Request Help.
xuewy
Posts: 13
Joined: 06 Mar 2019, 14:06

Re: Aarch64 platform Java Error that amc script did not work

Post by xuewy »

Below is the result after install libjna-java, still not work

Code: Select all

root@Emby:~# filebot -script fn:sysinfo
FileBot 4.8.5 (r6216)
JNA Native: java.lang.ExceptionInInitializerError
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load aarch64 (64-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
p7zip: p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,4 CPUs LE)
unrar: java.io.IOException: Cannot run program "unrar": error=2, No such file or directory
Chromaprint: groovy.lang.MissingMethodException: No signature of method: net.filebot.web.AcoustIDClient.version() is applicable for argument types: () values: []
Possible solutions: getIcon(), iterator(), every()
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-03-16 (r556)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_181
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 409 MB Max Memory / 19 MB Used Memory
OS: Linux (aarch64)
HW: Linux Emby 5.0.0-aml-s905 #5.77 SMP PREEMPT Sat Mar 16 13:50:19 MSK 2019 aarch64 GNU/Linux
DATA: /root/.filebot
Package: DEB
License: FileBot License P7195364 (Valid-Until: 2020-03-15)
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Aarch64 platform Java Error that amc script did not work

Post by rednoah »

1.
Please post sysenv output.

2.
Please find libmediainfo.so on your system and give me the path where it's installed on your system.
:idea: Please read the FAQ and How to Request Help.
xuewy
Posts: 13
Joined: 06 Mar 2019, 14:06

Re: Aarch64 platform Java Error that amc script did not work

Post by xuewy »

Here you are!

1.

Code: Select all

root@Emby:~# filebot -script fn:sysenv
# Environment Variables #
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANGUAGE: en_US.UTF-8
SHELL: /bin/bash
SSH_TTY: /dev/pts/0
SSH_CLIENT: 192.168.1.199 55881 22
ARCH: arm64
LC_MESSAGES: en_US.UTF-8
TERM: xterm
USER: root
LANG: en_US.UTF-8
XDG_SESSION_ID: 65
SSH_CONNECTION: 192.168.1.199 55881 192.168.1.143 22
MAIL: /var/mail/root
LC_ALL: C
LOGNAME: root
PWD: /root
XDG_RUNTIME_DIR: /run/user/0
HOME: /root
SHLVL: 1
_: /usr/bin/filebot


# Java System Properties #
java.vendor: Oracle Corporation
sun.java.launcher: SUN_STANDARD
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
os.name: Linux
sun.boot.class.path: /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/classes
grape.root: /root/.filebot/grape
java.vm.specification.vendor: Oracle Corporation
java.runtime.version: 1.8.0_181-8u181-b13-2~deb9u1-b13
useExtendedFileAttributes: true
user.name: root
user.language: en
sun.boot.library.path: /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/aarch64
jna.nosys: true
application.deployment: deb
net.filebot.gio.GVFS: /run/user/0/gvfs
java.version: 1.8.0_181
user.timezone:
sun.arch.data.model: 64
java.endorsed.dirs: /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/endorsed
sun.cpu.isalist:
sun.net.client.defaultConnectTimeout: 10000
sun.jnu.encoding: UTF-8
file.encoding.pkg: sun.io
unixfs: false
file.separator: /
java.specification.name: Java Platform API Specification
java.class.version: 52.0
user.country: US
jna.boot.library.path: /usr/lib/aarch64-linux-gnu/jni
java.home: /usr/lib/jvm/java-8-openjdk-arm64/jre
useCreationDate: false
java.vm.info: mixed mode
os.version: 5.0.0-aml-s905
useGVFS: true
path.separator: :
java.vm.version: 25.181-b13
jna.boot.library.name: jnidispatch.system
java.awt.printerjob: sun.print.PSPrinterJob
sun.io.unicode.encoding: UnicodeLittle
awt.toolkit: sun.awt.X11.XToolkit
application.dir: /root/.filebot
jna.library.path: /usr/lib/aarch64-linux-gnu/jni
http.agent: FileBot/4.8.5
user.home: /root
java.specification.vendor: Oracle Corporation
java.library.path: /usr/lib/aarch64-linux-gnu/jni
java.vendor.url: http://java.oracle.com/
java.vm.vendor: Oracle Corporation
java.runtime.name: OpenJDK Runtime Environment
sun.java.command: /usr/share/filebot/jar/filebot.jar -script fn:sysenv
java.class.path: /usr/share/filebot/jar/filebot.jar
net.filebot.archive.extractor: ShellExecutables
java.vm.specification.name: Java Virtual Machine Specification
java.vm.specification.version: 1.8
sun.cpu.endian: little
sun.os.patch.level: unknown
java.io.tmpdir: /root/.filebot/tmp
java.vendor.url.bug: http://bugreport.sun.com/bugreport/
swing.crossplatformlaf: javax.swing.plaf.nimbus.NimbusLookAndFeel
net.filebot.UserFiles.fileChooser: JavaFX
os.arch: aarch64
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
java.ext.dirs: /usr/lib/jvm/java-8-openjdk-arm64/jre/lib/ext:/usr/java/packages/lib/ext
user.dir: /root
line.separator:

java.vm.name: OpenJDK 64-Bit Server VM
java.net.useSystemProxies: true
org.apache.commons.logging.Log: org.apache.commons.logging.impl.NoOpLog
file.encoding: UTF-8
sun.net.client.defaultReadTimeout: 60000
jna.nounpack: true
java.specification.version: 1.8
application.cache: /root/.filebot/cache


# Arguments #
args[0] = -script
args[1] = fn:sysenv


Done ヾ(@⌒ー⌒@)ノ
2.

Code: Select all

root@Emby:~# find / -iname "*mediainfo*"
/usr/lib/aarch64-linux-gnu/libmediainfo.so.0
/usr/lib/aarch64-linux-gnu/libmediainfo.so.0.0.0
/usr/share/doc/libmediainfo0v5
/opt/emby-server/system/dashboard-ui/bower_components/emby-webcomponents/mediainfo
/opt/emby-server/system/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.css
/opt/emby-server/system/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js
/var/lib/dpkg/info/libmediainfo0v5:arm64.symbols
/var/lib/dpkg/info/libmediainfo0v5:arm64.list
/var/lib/dpkg/info/libmediainfo0v5:arm64.triggers
/var/lib/dpkg/info/libmediainfo0v5:arm64.shlibs
/var/lib/dpkg/info/libmediainfo0v5:arm64.md5sums
/var/cache/apt/archives/libmediainfo0v5_0.7.91-1_arm64.deb
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Aarch64 platform Java Error that amc script did not work

Post by rednoah »

Let's try this and see what happens.

Open filebot.sh and replace

Code: Select all

LIBRARY_PATH=$(echo /usr/lib/*-linux-gnu*/jni | tr ' ' ':')
with

Code: Select all

LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:/usr/lib/aarch64-linux-gnu/jni
:idea: Please read the FAQ and How to Request Help.
xuewy
Posts: 13
Joined: 06 Mar 2019, 14:06

Re: Aarch64 platform Java Error that amc script did not work

Post by xuewy »

Do you mean to edit the /usr/share/filebot/bin/filebot.sh?
If the path is correct, it seems that no change for the issue, still the same problem. Here is the result when I change the Library path as you suggested:

Code: Select all

root@Emby:/usr/share/filebot/bin# cat filebot.sh
#!/bin/sh
FILEBOT_HOME="/usr/share/filebot"

if [ -z "$HOME" ]; then
        echo '$HOME must be set'
        exit 1
fi

# select application data folder
APP_DATA="$HOME/.filebot"

# select libjnidispatch.system.so from $(uname -m)-linux-gnu folder
LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:/usr/lib/aarch64-linux-gnu/jni

java -Dapplication.deployment=deb -Djna.boot.library.name=jnidispatch.system -Dnet.filebot.archive.extractor=ShellExecutables -Dunixfs=false -DuseExtendedFileAttributes=true -DuseCreationDate=false -Djava.net.useSystemProxies=true -Djna.nosys=true -Djna.nounpack=true -Djna.boot.library.path="$LIBRARY_PATH" -Djna.library.path="$LIBRARY_PATH" -Djava.library.path="$LIBRARY_PATH" -Dapplication.dir="$APP_DATA" -Dapplication.cache="$APP_DATA/cache" -Djava.io.tmpdir="$APP_DATA/tmp" -Dfile.encoding="UTF-8" -Dsun.jnu.encoding="UTF-8" -Dnet.filebot.UserFiles.fileChooser=JavaFX -DuseGVFS=true -Dnet.filebot.gio.GVFS="$XDG_RUNTIME_DIR/gvfs" $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@"

Code: Select all

root@Emby:/usr/share/filebot/bin# filebot -script fn:sysinfo
FileBot 4.8.5 (r6216)
JNA Native: java.lang.ExceptionInInitializerError
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load aarch64 (64-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
p7zip: p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,4 CPUs LE)
unrar: java.io.IOException: Cannot run program "unrar": error=2, No such file or directory
Chromaprint: groovy.lang.MissingMethodException: No signature of method: net.filebot.web.AcoustIDClient.version() is applicable for argument types: () values: []
Possible solutions: getIcon(), iterator(), every()
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-03-16 (r556)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_181
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 409 MB Max Memory / 19 MB Used Memory
OS: Linux (aarch64)
HW: Linux Emby 5.0.0-aml-s905 #5.77 SMP PREEMPT Sat Mar 16 13:50:19 MSK 2019 aarch64 GNU/Linux
DATA: /root/.filebot
Package: DEB
License: FileBot License P7195364 (Valid-Until: 2020-03-15)
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Aarch64 platform Java Error that amc script did not work

Post by rednoah »

Sorry, then I have no idea. I can only assume that somehow libjnidispatch.system.so / libmediainfo.so is broken and can't just be loaded?

strace might be able to help you understand what's going on when filebot is trying to find and load libjnidispatch and libmediainfo, and then maybe give us a clue as to why it's not working:
https://linux.die.net/man/1/strace


EDIT:

Re-reading the previous post, if find / -iname "*jnidispatch*" doesn't yield any results, then that's big problem because the library is just missing then.

According to the package index, it should be there. Can you double check that this package is in fact installed?
https://packages.ubuntu.com/bionic/arm6 ... i/filelist
:idea: Please read the FAQ and How to Request Help.
Post Reply