| Summary: | NPE in MeasurementChartsManagerBean for updated plugin metrics | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Elias Ross <genman> |
| Component: | Core UI | Assignee: | Nobody <nobody> |
| Status: | NEW --- | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.9 | 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: | |
Description of problem: Caused by: java.lang.NullPointerException at org.rhq.enterprise.server.measurement.MeasurementChartsManagerBean.getAggregateMetricDisplaySummaries(MeasurementChartsManagerBean.java:498) [rhq-server.jar:4.9.0] at org.rhq.enterprise.server.measurement.MeasurementChartsManagerBean.getMetricDisplaySummariesForCompatibleGroup(MeasurementChartsManagerBean.java:118) [rhq-server.jar:4.9.0] The code: private List<MetricDisplaySummary> getAggregateMetricDisplaySummaries(Subject subject, EntityContext context, int[] measurementDefinitionIds, long begin, long end, boolean enabledOnly) throws MeasurementException { ... MeasurementDefinition definition = entityManager.find(MeasurementDefinition.class, definitionId); summary.setDefinitionId(definition.getId()); I'm guessing the definitionId is invalid. Version-Release number of selected component (if applicable): 4.9 How reproducible: It seems to be caused if something happens with a plugin update. Code should guard against invalid IDs and log a warning instead. Steps to Reproduce: 1. Add plugin 2. Revise plugin (how?) Additional info: