Schedule an operation via cron expression. - use an invalid expression - use the example of " 0/5 14,18,3-39,52 * ? JAN,MAR,SEP MON-FRI 2002-2010 " both will end up in a red bar Server log shows - invalid expression - based on that data the job will never schedule ( " Caused by: org.quartz.SchedulerException: Based on configured schedule, the given trigger will never fire. " ) We need to make sure the user gets the real cause in the bar as a yellow warning
The Exception is thrown here: org.rhq.enterprise.server.operation.OperationManagerBean#convertToTrigger private Trigger convertToTrigger(JobTrigger jobTrigger) throws ParseException { Trigger trigger; if (jobTrigger.getRecurrenceType() == JobTrigger.RecurrenceType.CRON_EXPRESSION) { CronTrigger cronTrigger = new CronTrigger(); try { cronTrigger.setCronExpression(jobTrigger.getCronExpression()); <<<- 1 } catch (ParseException e) { throw new RuntimeException(e); <<<-- 2 } trigger = cronTrigger; And then rethrown as RuntimeException which then gets delivered to the red bar as org.rhq.enterprise.gui.coregui.server.gwt.OperationGWTServiceImpl#getResourceOperationSchedule via org.rhq.enterprise.gui.coregui.server.gwt.AbstractGWTServiceImpl#getExceptionToThrowToClient I think we should somehow either pass the ParseException around, which has the disadvantage that it needs to be handled in a few more places, that even don't use cron-expressions at all. Or in org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.operation.schedule.ResourceOperationScheduleDataSource#executeAdd try to find that parse Exception in #onFailure() and display it accordingly.
Note, that you can already get the parse-exception by right-clicking on the red bar and then on "caused by"