Affects Version/s: 6.2.10 EE GA1, 6.2.X EE, 7.0.0 M3
Unable to delete a scheduled task that is created without a registered destination
Steps to reproduce/Testing done
- Deploy my demo portlet and add it to a page.
- Click the Actions button
- Click the first option "Create Job"
- Notice a Destination Name has now appeared in the Destinations Section. IGNORE it for now.
- Notice also a new Scheduled Job has appeared. Attempt to delete it.
- In the server log, you will notice the "NullPointerException"
- Click "Create/Register" next to the Destination
- Again, click Delete on the Scheduled Job.
Customer quote on this issue:
I don't think I should be able to create a Job that I then can't delete, even if the Job was malformed and didn't have a Destination registered.
This issue was deemed a bug on LPP-11696.
I would say that this behavior is a bug and it should be fixed in that when it hits QuartzSchedulerEngine.unregisterMessageListener, it does not throw an NPE so that it can keep going on and delete the job in QuartzSchedulerEngine.delete.
My rationale is the following use case: Plugin1 creates a scheduled job and Plugin2 creates the destination that Plugin1's job uses. If Plugin1 is deployed first, the job should still be scheduled (this goes against what the client wants). Additionally, if Plugin2 is undeployed, the job from Plugin1 should still be able to be deleted.
Results of Testing
Expected behavior: The job is not created if a destination is not registered
Actual behavior: The job is created even though a destination is not registered. Therefore it can't be deleted.
Reproduced in trunk? Yes (65dce37f3213fab8df1f2f4159dd0b263239ecb2)
Reproduced in 6.2.x? Yes (1ab9e529fed9da12c3402d713e426ee94988c55a)