[Synology] Error: Could not initialize class com.sun.jna.Platform

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
mrvnk
Posts: 4
Joined: 16 Mar 2019, 02:31

[Synology] Error: Could not initialize class com.sun.jna.Platform

Post by mrvnk »

Hey there, I installed the Filebot package via Synolgy package manager and get the following error

Code: Select all

filebot -script 'fn:sysinfo'
FileBot 4.8.2 (r5789)
JNA Native: java.lang.ExceptionInInitializerError
MediaInfo: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Platform
Apache Commons VFS: [zip, rar]
FFprobe: java.io.IOException: Cannot run program "/volume1/@appstore/MediaServer/bin/ffprobe": error=2, No such file or directory
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Platform
Unicode Filesystem: OK
Script Bundle: 2019-02-26 (r552)
Groovy: 2.5.1
JRE: OpenJDK Runtime Environment 1.8.0_161
Could not initialize class com.sun.jna.Platform
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Platform
	at Script1.run(Script1.groovy:140)
	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:154)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:36)
	at net.filebot.Main.main(Main.java:131)

Failure (°_°)
Using Synology DS215j - CPU: armada375

Any ideas?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Synology] Error: Could not initialize class com.sun.jna.Platform

Post by rednoah »

What does uname -a say?
:idea: Please read the FAQ and How to Request Help.
mrvnk
Posts: 4
Joined: 16 Mar 2019, 02:31

Re: [Synology] Error: Could not initialize class com.sun.jna.Platform

Post by mrvnk »

Code: Select all

uname -a
Linux mrvNAS 3.2.40 #23824 SMP Tue Feb 12 16:48:42 CST 2019 armv7l GNU/Linux synology_armada375_ds215j
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Synology] Error: Could not initialize class com.sun.jna.Platform

Post by rednoah »

No idea. That one should work. Did you install all the dependencies such as MediaInfo?

You could try the 4.8.5 beta and see if it works any better on your device.
:idea: Please read the FAQ and How to Request Help.
mrvnk
Posts: 4
Joined: 16 Mar 2019, 02:31

Re: [Synology] Error: Could not initialize class com.sun.jna.Platform

Post by mrvnk »

No, actually I did not install MediaInfo because there is no package available in packagemanager. Where / how can I get it? Besides there is a libmediainfo.so in /volume1/@appstore/filebot/lib/armv7l

Where can I get the beta?

Is there any possibility to log why JNA fails to initialize? Actually I am a developer but Java is not included in my skills lol
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Synology] Error: Could not initialize class com.sun.jna.Platform

Post by rednoah »

1.
Installing FileBot on Synology NAS:
viewtopic.php?f=13&t=1802

:idea: Please read the Optional Features section.


2.
[BETA] FileBot 4.8.5:
viewtopic.php?f=6&t=9535


3.
No idea why it might not work. I guess there's compatibility issues somewhere somehow, and so the native code doesn't load, and so JNA is missing all the native methods. You could possibly "fix" it by deleting libjnidispatch.so which might make it at least not crash.

EDIT: Using the JDK that is included in my package index instead of the outdated Synology one might also do the trick, maybe.
:idea: Please read the FAQ and How to Request Help.
mrvnk
Posts: 4
Joined: 16 Mar 2019, 02:31

Re: [Synology] Error: Could not initialize class com.sun.jna.Platform

Post by mrvnk »

Okay I fixed it, sorry for not trying this out before:
I used the Java8 package provided by Synology and when I added a source to install MediaInfo I found the Java installer provided by you and that fixed the issue.

Thanks a lot for your help and fast responses!
Post Reply