WordRider Home
Welcome! Log In Create A New Profile

Advanced

FRD Java error when running from VBS or Task scheduler

Posted by ifox 
FRD Java error when running from VBS or Task scheduler
December 14, 2015 02:25AM
When I start FRD.exe from VBscript (wshshell.Run), or from Windows Task Scheduler (scheduled task),
the application starts, but a critical error occurs:

java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native

Chyba

Message:
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
Level:
SEVERE
Stack Trace:
Could not initialize class com.sun.jna.Native
cz.vity.freerapid.utilities.os.WindowsCommander$Kernel32. (WindowsCommander.java:206)
cz.vity.freerapid.utilities.os.WindowsCommander.preventSystemStandby(WindowsCommander.java:199)
cz.vity.freerapid.gui.managers.SystemManager$1.propertyChange(SystemManager.java:45)
java.beans.PropertyChangeSupport.fire(Unknown Source)
java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
cz.vity.freerapid.gui.managers.ProcessManager.setDownloading(ProcessManager.java:529)
cz.vity.freerapid.gui.managers.ProcessManager.queueDownload(ProcessManager.java:272)
cz.vity.freerapid.gui.managers.ProcessManager.execute(ProcessManager.java:174)
cz.vity.freerapid.gui.managers.ProcessManager.run(ProcessManager.java:98)

JAVA v. 1.7.0_80 b15
Windows 7 SP1 32bit.



Edited 3 time(s). Last edit at 12/14/2015 09:46AM by ifox.
Re: FRD Java error when running from VBS or Task scheduler
December 14, 2015 10:25AM
The startup crash has been solved by deleting the "Vitysoft" profile folder ...



Edited 1 time(s). Last edit at 01/14/2016 11:32AM by ifox.
Re: FRD Java error when running from VBS or Task scheduler
January 14, 2016 09:01AM
Edit:

Not fixed :( After I deleted the Vitysoft profile folder, FRD could be started using Windows Task Scheduler, but when the downloads finished and a reboot or shutdown is planned, it crashed after the countdown, with the error:

java.lang.NoClassDefFoundError:

Could not initialize class com.sun.jna.Native
com.sun.jna.Pointer. (Pointer.java:42)
com.sun.jna.platform.win32.WinNT$HANDLEByReference.(WinNT.java:1029)
com.sun.jna.platform.win32.WinNT$HANDLEByReference.(WinNT.java:1025)
cz.vity.freerapid.utilities.os.WindowsShutdownUtils.setShutdownPrivileges(WindowsShutdownUtils.java:51)
cz.vity.freerapid.utilities.os.WindowsShutdownUtils.exitWindowsEx(WindowsShutdownUtils.java:46)
cz.vity.freerapid.utilities.os.WindowsShutdownUtils.reboot(WindowsShutdownUtils.java:24)
cz.vity.freerapid.utilities.os.WindowsCommander.shutDown(WindowsCommander.java:102)
cz.vity.freerapid.core.tasks.CloseInTimeTask.succeeded(CloseInTimeTask.java:69)
cz.vity.freerapid.core.tasks.CloseInTimeTask.succeeded(CloseInTimeTask.java:19)
org.jdesktop.application.Task$StatePCL$1.run(Task.java:1013)
java.awt.event.InvocationEvent.dispatch(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$300(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)

Any solution?

Steps to reproduce this bug:

1) add a download URL to FRD and pause it
2) set an automatic shutdown (reboot or shutdown) in FRD
3) set FRD to remember an auto shutdown option permanently
4) resume the download (1) and exit FRD (quickly, before the download starts)
5) create a scheduled task in Windows Task Scheduler and set the start to a near time
6) wait for the task to be executed
7) see what happens:
- FRD will open
- the file will be downloaded OK
- you'll see the 30s countdown window
- after the count reaches 0, FRD crashes with the error java.lang.NoClassDefFoundError,
instead of a reboot or shutdown.



Edited 8 time(s). Last edit at 01/14/2016 11:30AM by ifox.
Re: FRD Java error when running from VBS or Task scheduler
January 14, 2016 12:33PM
This seems like a working directory problem. You could try setting the "Start in" field in Task Scheduler to the directory where frd.exe is.

You can reproduce the original error by enabling Options > Preferences > General tab > Prevent standby while downloading. This way the problem is easier to reproduce.
Re: FRD Java error when running from VBS or Task scheduler
January 14, 2016 03:54PM
ntoskrnl Wrote:
-------------------------------------------------------
> This seems like a working directory problem. You
> could try setting the "Start in" field in Task
> Scheduler to the directory where frd.exe is.
>

Your solution really works, thank you!
Sorry, only registered users may post in this forum.

Click here to login