Bug 996274
Summary: | Cron scheduling expressions give red bar | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Heiko W. Rupp <hrupp> |
Component: | Operations | Assignee: | Nobody <nobody> |
Status: | NEW --- | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.8 | CC: | hrupp |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Heiko W. Rupp
2013-08-12 20:07:31 UTC
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" |