Scheduled Task List crashing in Lucee Admin
Description
Environment
Lucee 5.3.8.189
Apache Tomcat/9.0.35
11.0.7 (AdoptOpenJDK) 64bit
Linux (4.18.0-305.7.1.el8_4.x86_64) 64bit / CentOS Linux 8.4.2105
Attachments
- 12 Jul 2021, 03:57 pm
- 11 Jul 2021, 11:28 pm
Activity
Michael Offner 23 July 2021 at 08:24
fixed the NPE pointed out by @Pothys - MitrahSoft
Michael Offner 23 July 2021 at 08:23
Pothys - MitrahSoft 13 July 2021 at 12:00
@Michael Offner I've checked with the fixed version and this issue was fixed.
But while creating a schedule task, if the file field is not file means Admin UI shows a NullPointerException.
https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/schedule/ScheduleTaskImpl.java#L113
I added a fix for this issue
Pull Request: https://github.com/lucee/Lucee/pull/1381
Stacktrace from application.log
"ERROR","ajp-nio-8009-exec-10","07/13/2021","16:37:34","webadmin5.3.8.192-SNAPSHOT","java.lang.NullPointerException;java.lang.NullPointerException;lucee.runtime.exp.NativeException: java.lang.NullPointerException
at lucee.runtime.schedule.ScheduleTaskImpl.<init>(ScheduleTaskImpl.java:113)
at lucee.runtime.tag.Schedule.doUpdate(Schedule.java:475)
at lucee.runtime.tag.Schedule.doStartTag(Schedule.java:427)
at lucee.runtime.tag.Admin.doTagSchedule(Admin.java:422)
at lucee.runtime.tag.Admin._doStartTag(Admin.java:516)
at lucee.runtime.tag.Admin.doStartTag(Admin.java:349)
at services_schedule_edit_cfm1242$cf.call(/admin/services.schedule.edit.cfm:124)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1031)
Michael Offner 12 July 2021 at 16:10
i changed the functionality a little bit, in case the parent directory does not exist and the grand parent exist, it will create the parent directory. This is an approach, we already use in other places.
In addition not having a valid file defined, no longer is a deal breaker, it simply will ignore the file and log it to the scheduler.log
https://github.com/lucee/Lucee/commit/9fcc1aa7f4fefd9d172e090e2c4f6118d63633b0
Zac Spitzer 12 July 2021 at 15:54Edited
there should be an error written to the context’s application.log
file on startup?
"ERROR","main","07/12/2021","17:48:05","lucee.runtime.schedule.SchedulerImpl","Directory for output file [\var\www\html\semseo\logs\act_check.html] doesn't exist;Directory for output file [\var\www\html\semseo\logs\act_check.html] doesn't exist;java.io.IOException: Directory for output file [\var\www\html\semseo\logs\act_check.html] doesn't exist
at lucee.runtime.schedule.ScheduleTaskImpl.<init>(ScheduleTaskImpl.java:108)
at lucee.runtime.schedule.SchedulerImpl.readInTask(SchedulerImpl.java:202)
at lucee.runtime.schedule.SchedulerImpl.readInAllTasks(SchedulerImpl.java:179)
at lucee.runtime.schedule.SchedulerImpl.<init>(SchedulerImpl.java:89)
at lucee.runtime.config.ConfigImpl.setScheduler(ConfigImpl.java:1657)
at lucee.runtime.config.XMLConfigWebFactory._loadScheduler(XMLConfigWebFactory.java:4147)
Just checked the admin UI, it throws a warning when the path doesn’t exist
Details
Assignee
Michael OffnerMichael OffnerReporter
Adam StetzerAdam StetzerPriority
NewFix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Reporter
Priority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
The screen crashes when we click on the scheduled tasks from Lucee Admin.