SchedulerException is thrown when scheduling a job with a trigger interval that is less than zero

Description

Description
SchedulerException is thrown when scheduling a job with a trigger interval that is less than zero.

Note: In Liferay 6.2, setting a trigger interval less than zero prevents a scheduled job from being scheduled.

Steps to Reproduce

  1. Add portal property to portal-ext.properties:

  2. Start Liferay DXP

Expected Behavior: No errors during startup.
Actual Behavior: SchedulerException is thrown

Error Log:

Activity

Show:

Hong ZhaoFebruary 6, 2017 at 10:31 PM
Edited

PASSED Manual Testing following the steps in the comment.

Fixed on:
Tomcat 7.0.62 + MySQL 5.6. Portal ee-6.2.x GIT ID: 4e425b98d629ecaefb4bcd2933f744f84865b1c1.

No errors during startup.

Miguel Ángel Pastor OlivarJanuary 17, 2017 at 9:11 AM

Just started reviewing migue/liferay-portal-ee#66.

 

Sent from GH

Hong ZhaoJanuary 5, 2017 at 6:06 PM

PASSED Manual Testing following the steps in the description.

Fixed on:
Tomcat 8.0.32 + MySQL 5.6. Portal ee-7.0.x GIT ID: 35f70f7688d7696839f35eee6f888e2f3070d1b0.
Tomcat 8.0.32 + MySQL 5.6. Portal master GIT ID: 0dd507c60a248c2994814f50e36828a3970b0438.

No exception thrown in console.

Eric YanDecember 22, 2016 at 4:48 PM

Liferay DXP
Currently, Liferay is checking for a valid scheduleEntry before attempting to schedule a job, but it does not verify if there is a valid trigger associated with the scheduleEntry.
Including that extra check would prevent the attempt to schedule a job when there is not a valid trigger associated with the scheduleEntry.

This occurred after the changes introduced from .

Liferay 6.2
In Liferay 6.2, triggers are handled differently and does not throw a SchedulerException due to an NPE.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Branch Version/s

7.0.x
6.2.x

Backported to Branch

Committed

Fix Priority

3

Git Pull Request

Bug Type

Regression Bug

7.0 Fix Pack Version

10

Components

Affects versions

Priority

Zendesk Support

Created December 22, 2016 at 4:07 PM
Updated June 26, 2023 at 12:20 AM
Resolved January 17, 2017 at 8:22 PM