Page 1 of 1
Synology: Error: Could not find or load main class @{java.application.options}
Posted: 17 Jul 2018, 15:54
by JenseniDK
Hi
I am on a Synology based solution, and after my holiday, I get this error when running Filebot 4.8.2 with latest dsm and Java 1.8.0_171.
Code: Select all
filebot -script 'fn:amc' /volume1/Download/rutorrent/completed --output /volume2/Multimedia --action move -non-strict --conflict auto --lang en --def 'subtitles=dan' 'clean=y' 'deleteAfterExtract=y' 'kodi=10.0.0.75' 'seriesFormat=Serier/{n}/Season {s}/{n} - {s00e00} - {t}' 'movieFormat=Film/{n} ({y})/{n} - ({y})' 'excludeList=.excludes' --log all --log-file '/volume1/@appstore/filebot-node/data/filebot.log'
------------------------------------------
Error: Could not find or load main class @{java.application.options}
------------------------------------------
[Process error]
I am a bit Clueless here..
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 17 Jul 2018, 16:02
by rednoah
Are you using the latest release? Like the one from today?
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 18 Jul 2018, 02:41
by JenseniDK
I have updated to todays version now (DSM 6.2-23739 Update 2), and the error have changed to the following
$ filebot -version
Code: Select all
/usr/local/bin/filebot: line 65: Java: Command not found
Uninstalling the officially Java package from Synology.
I have tried with your unofficial Java installer, it reports error on installation.
I then installed the official Java 8 app from synology and installed version 1.8.0_171 - Same error
Java is found when I ssh into the system and log on as admin, which is the user, that I use for Filebot, both installing, and scheduling
Java: Command not found
Posted: 18 Jul 2018, 07:43
by rednoah

This is a separate topic, and has nothing to do with the OP. Please don't reuse the same thread for unrelated issues. Thanks!
1.
If
Unofficial Java Installer is not working, then what does the error
log say?
How can I find the log?
2.
If
java is not in the
$PATH then you can add it to the
$PATH either by adding it to the
$PATH before calling your script (this is what your
login shell does, but not what
cron does) or by symlinking the executable into one of the folders that's in the
$PATH by default, such as
/usr/local/bin (this is what my java installer does). I'd recommend the latter.
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 19 Jul 2018, 03:53
by JenseniDK
1. The unofficially Java installer fails in installation, it does not complete the installation. The only Java related logfile is the pkgctl-oracle-java.log
2. Java is in the path
Code: Select all
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/var/packages/Java8/target/j2sdk-image/bin:/var/packages/Java8/target/j2sdk-image/jre/bin
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 19 Jul 2018, 03:58
by rednoah
1.
If it fails on installation, is there an error message? What does it say? Screenshots?
What does the log say? I find 2 related log files. I'm not sure what the first one will say, but the second one should tell us what's going on:
Code: Select all
$ find / -iname '*.log' 2>&1 | grep java
/var/log/upstart/pkgctl-oracle-java.log
/volume1/@appstore/oracle-java/install-jdk.log
1a. What does this log say?
Code: Select all
cat /var/log/upstart/pkgctl-oracle-java.log
1b. What does that log say?
Code: Select all
cat /volume1/@appstore/oracle-java/install-jdk.log
2.
As previously explained, maybe yes for you, but only for you and your login shell, which executes
~/.profile on launch. No, for anything else, such as cron, scheduler, processes spawned by a background service, etc.

Create a scheduled task and make it call
printenv. You'll see the difference.

If it says
java: command not found then
java is
NOT in the
$PATH in that particular context or environment.
The solution is to symlink the java executable into
/usr/local/bin:
rednoah wrote: ↑18 Jul 2018, 07:43
If
java is not in the
$PATH then you can add it to the
$PATH either by adding it to the
$PATH before calling your script (this is what your
login shell does, but not what
cron does) or by symlinking the executable into one of the folders that's in the
$PATH by default, such as
/usr/local/bin (this is what my java installer does). I'd recommend the latter.
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 19 Jul 2018, 17:30
by gardinerr2
Java installer is not working for me either
Oops, something went wrong.
Could this be because oracle has release version 181, and the release is for 171?
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 19 Jul 2018, 19:01
by rednoah
What does the log say?
Code: Select all
cat /volume1/@appstore/oracle-java/install-jdk.log

Please make a new thread. The OP is about a completely unrelated issue.
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 20 Jul 2018, 03:26
by JenseniDK
Error log from installing Java says:
Code: Select all
cat install-jdk.log
Download http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
jdk-8u171-linux-x64.tar.gz: No such file or directory
Expected SHA256 checksum: b6dd2837efaaec4109b36cfbb94a774db100029f98b0d78be68c27bec0275982
Actual SHA256 checksum:
ERROR: SHA256 checksum mismatch
I have created a symlink for java in /usr/local/bin
Code: Select all
ln -s /volume1/@appstore/java8/j2sdk-image/bin/java /usr/local/bin/java
We are back at this error
Code: Select all
filebot -version
Error: Could not find or load main class @{java.application.options}
executed from /usr/local/bin
The Symlink fixed the missing Java, but its still not able to load the main class and its the same error that the Filebot Node application gives me
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 20 Jul 2018, 07:20
by rednoah
Are you sure you're using the latest version? Uninstall FileBot. Refresh Package Sources. Install FileBot.
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 20 Jul 2018, 08:03
by gardinerr2
Tried that, same issue
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 20 Jul 2018, 08:04
by gardinerr2
If you use the link from the logs in a browser you get the following message.
Sorry!
In order to download products from Oracle Technology Network you must agree to the OTN license terms.
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 20 Jul 2018, 10:20
by JenseniDK
I have now uninstalled both Filebot and Filebot Node, refreshed, and reinstalled. Installed my license, but the execute buttom is not active
Code: Select all
filebot -l-icense /tmp/upload_(long string)
--------
X86_64
Filebot License zzzzzz (Valid until 2019-07-18) has been activated successfull
--------
[Process complete]
I presume that filebot runs as the logged in user?
Update: Trying to run filebot from an ssh shell seems to be working well, its only filebot Node, that seems to be the problem now.
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 20 Jul 2018, 11:47
by rednoah
gardinerr2 wrote: ↑20 Jul 2018, 08:03
Tried that, same issue
The
(1) java: command not found issue or the
(2) Could not find or load main class @{java.application.options} issue? This is way 1 unique thread per 1 unique issue is generally a good idea, ok please?
1.
You mention that you already fix this one by using the Synology Java package and creating the necessary symlinks, no?
2.
This is impossible if you're using the latest SPK package, as it would effect everyone else as well, but it seems to be working for everyone, so you most likely are accidentally somehow running an old build.
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 20 Jul 2018, 11:51
by rednoah
JenseniDK wrote: ↑20 Jul 2018, 10:20
I have now uninstalled both Filebot and Filebot Node, refreshed, and reinstalled. Installed my license, but the execute buttom is not active
The butten is automatically enabled / disabled depending on whether or not you have entered / selected all the required options. Presumably, you have selected
Rename: <nothing>. The Execute button will be enabled once you have selected
Rename: move and rename or any other valid combo box option.
Re: Synology: Error: Could not find or load main class @{java.application.options}
Posted: 20 Jul 2018, 16:56
by JenseniDK
Check, now it works, tnx a lot.