JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > English Support > Problems & Bug Reports
Reply
 
Thread Tools Display Modes
  #1  
Old 08.06.2017, 08:44
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default JDownloader don't start anymore

I have installed JDownloader on my Raspberry Pi. After a reboot, JDownloader give an error on startup:
Code:
|---------------------------Headless Information-------------------------------
|	Exception occured
|	Exception occured
|	An unexpected error occured.
|	JDownloader will try to fix this. If this happens again, please contact our support.
|	java.lang.NoClassDefFoundError: org/appwork/utils/net/httpserver/handler/ExtendedHttpRequestHandler
|		at java.lang.ClassLoader.defineClass1(Native Method)
|		at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
|		at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
|		at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
|		at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
|		at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
|		at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
|		at java.security.AccessController.doPrivileged(Native Method)
|		at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
|		at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
|		at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
|		at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
|		at org.jdownloader.api.RemoteAPIController.<init>(RemoteAPIController.java:315)
|		at org.jdownloader.api.RemoteAPIController.<clinit>(RemoteAPIController.java:116)
|		at jd.SecondLevelLaunch$12$1.run(SecondLevelLaunch.java:881)
|	Caused by: java.lang.ClassNotFoundException: org.appwork.utils.net.httpserver.handler.ExtendedHttpRequestHandler
|		at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
|		at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
|		at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
|		at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
|		... 15 more
|	Press Enter to continue
What does it means? How to resolve?
Reply With Quote
  #2  
Old 08.06.2017, 09:15
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

Close JDownloader and delete JDownloader.jar and Core.jar, also the folders 'tmp' and 'update'
Download installer.jdownloader.org/JDownloader.jar and place it in your folder and start JDownloader again.

Do you use systemd to start JDownloader? If so, please show the script
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 08.06.2017, 11:18
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

The procedure solved the problem, thank you!

To be honest, it's not the first time my JDownloader encounter an exception at startup, when it tries to install an update. I usually resolve the problem by deleting Core.jar and restarting JDownloader, but this time something else broke. Do you think disabling automatic updates could be a solution?

Yes I start JDownloader with this systemd script:
Code:
[Unit]
Description=JDownloader Daemon
After=network-online.target

[Service]
Type=simple
User=pi
ExecStartPre=-/bin/mv /home/pi/.jdownloader/JDownloader.jar.backup.1 /home/pi/.jdownloader/JDownloader.jar 
ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /home/pi/.jdownloader/JDownloader.jar -norestart
Restart=on-failure
TimeoutStopSec=90

[Install]
WantedBy=multi-user.target
I had to add that ExecStartPre line because sometimes my JDownloader.jar is renamed as JDownloader.jar.backup.1 and the script fails. If you know a better workaround, I'd like to read it
Reply With Quote
  #4  
Old 08.06.2017, 11:43
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

Please modify according to this
github.com/OpenMediaVault-Plugin-Developers/openmediavault-jdownloader/blob/master/debian/jdownloader.service

Type and RemainAfterExit are important, else script will break update

DO NOT disable updates fix your script
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 08.06.2017, 14:07
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

I will, thank you!
Reply With Quote
  #6  
Old 08.06.2017, 15:08
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

You're welcome
__________________
JD-Dev & Server-Admin
Reply With Quote
  #7  
Old 11.06.2017, 11:30
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

I just have one minor problem with the new script you gave me: if I manually stop and start JDownloader (with sudo systemctl stop jdownloader && sudo systemctl start jdownloader), the daemon starts but the process never returns (I have to send a ctrl+c in order to regain control of the command line). Is there a way to fix this behavior?
Reply With Quote
  #8  
Old 12.06.2017, 16:49
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

modify script to launch JDownloader in background with
...JDownloader.jar &

Also do NOT add '-norestart' . This parameter is only intended for setup
__________________
JD-Dev & Server-Admin
Reply With Quote
  #9  
Old 12.06.2017, 17:23
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

Unfortunately it's not enough :( This is the modified script:

Code:
[Unit]
Description=JDownloader
After=network-online.target

[Service]
User=pi
Group=users
Type=oneshot
ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /home/pi/.jdownloader/JDownloader.jar &
RemainAfterExit=yes
StandardOutput=null

[Install]
WantedBy=multi-user.target

Last edited by avalloneandrea; 12.06.2017 at 22:40.
Reply With Quote
  #10  
Old 12.06.2017, 18:08
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /home/pi/.jdownloader/JDownloader.jar &
__________________
JD-Dev & Server-Admin
Reply With Quote
  #11  
Old 12.06.2017, 22:42
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

I'm sorry I didn't notice the previous script was cut because of the size of the window I've copied it from. I have updated the previous post: as you can I see, I'm already using the right command, without success.

Last edited by avalloneandrea; 13.06.2017 at 09:09.
Reply With Quote
  #12  
Old 13.06.2017, 10:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

StandardOutput=null
where does this come from? remove this
ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /home/pi/.jdownloader/JDownloader.jar >/dev/null 2>/dev/null &
__________________
JD-Dev & Server-Admin
Reply With Quote
  #13  
Old 14.06.2017, 09:57
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

It still doesn't work as expected. It's strange, because if I run
Code:
/usr/bin/java -Djava.awt.headless=true -jar /home/pi/.jdownloader/JDownloader.jar >/dev/null 2>/dev/null &
from the command line, it prints the pid and return; however, If i write the same command in the systemd script, and run
Code:
sudo systemctl start jdownloader
it never return unless I give a CTRL+C.
Reply With Quote
  #14  
Old 14.06.2017, 10:16
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

Can you show the complete systemd script again?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #15  
Old 14.06.2017, 10:28
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

Sure!

Code:
[Unit]
Description=JDownloader Daemon
After=network-online.target

[Service]
User=pi
Group=users
Type=oneshot
ExecStart=/usr/bin/java -Djava.awt.headless=true -jar /home/pi/.jdownloader/JDownloader.jar > /dev/null 2> /dev/null &
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
Reply With Quote
  #16  
Old 14.06.2017, 10:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

Did you do?
sudo systemctl daemon-reload
to reload the config files?

Maybe
After=network-online.target
is blocking because the network online is not finished? does this task even start/finish?
I would remove it
__________________
JD-Dev & Server-Admin
Reply With Quote
  #17  
Old 14.06.2017, 11:28
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

Yes I run a
Code:
sudo systemctl daemon-reload
after every edit of the script in order to load the changes.

I don't think
Code:
After=network-online.target
is the problem: the network is up, and I'm sure the task start and finish. Also, I have others systemd script with the same line, namely deluge and amule, and they all run smoothly.
Reply With Quote
  #18  
Old 14.06.2017, 11:57
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

I'm sorry but I don't know why it blocks for you.
The systemd github.com/OpenMediaVault-Plugin-Developers/openmediavault-jdownloader/blob/master/debian/jdownloader.service
is working fine also yours is working fine

Did you try to remove the after line?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #19  
Old 14.06.2017, 12:10
avalloneandrea avalloneandrea is offline
Super Loader
 
Join Date: Mar 2016
Posts: 27
Default

Yeah I forgot to say that I have tried anyway removing the line, but the outcome is the same :(
Reply With Quote
  #20  
Old 14.06.2017, 12:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

Can we do a teamviewer Session? contact me at support@jdownloader.org
__________________
JD-Dev & Server-Admin
Reply With Quote
  #21  
Old 14.06.2017, 15:35
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,554
Default

Fixed via teamviewer

Changed 'Type=oneshot' to 'Type=simple'
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 06:13.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.