| Summary: | DataSourceComponent assumes object can be cast to String always | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Operations Network | Reporter: | Michael Burman <miburman> |
| Component: | Plugin -- JBoss EAP 7 | Assignee: | Simeon Pinder <spinder> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Vojta Prusa <vprusa> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | JON 3.3.5 | CC: | fbrychta, loleary, vprusa |
| Target Milestone: | DR01 | Keywords: | Triaged |
| Target Release: | One-off release | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-06-06 18:56:59 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 1314853 | ||
Fixed in the master:
commit 3d44f1960b9282a142285b038a476adfa62d9e22
Author: Michael Burman <miburman>
Date: Tue Feb 2 15:44:47 2016 +0200
[BZ 1303935] Do not assume DMR object can be cast to String
Available for test in the following build: http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/plugins/eap/3.3/Update-03/DR01/ Result after update of eap plugin (for JON 3.3.5 with agent on EAP7):
2016-02-24 09:29:57,725 INFO [MeasurementManager.collector-1] (rhq.core.pc.measurement.MeasurementCollectorRunner)- [PERF] Collection of measurements for [Resource[id=11121, uuid=17845b7a-2ca3-49d6-bc0b-89e391be500d, type={JBossAS7}DataSource (Standalone), key=subsystem=datasources,data-source=ExampleDS, name=ExampleDS, parent=datasources]] (component=[org.rhq.modules.plugins.jbossas7.DatasourceComponent@7cbe9148]) took [17847]ms
For Update-03 DR01 (In reply to Vojta Prusa from comment #3) > Result after update of eap plugin (for JON 3.3.5 with agent on EAP7): > > 2016-02-24 09:29:57,725 INFO [MeasurementManager.collector-1] > (rhq.core.pc.measurement.MeasurementCollectorRunner)- [PERF] Collection of > measurements for [Resource[id=11121, > uuid=17845b7a-2ca3-49d6-bc0b-89e391be500d, type={JBossAS7}DataSource > (Standalone), key=subsystem=datasources,data-source=ExampleDS, > name=ExampleDS, parent=datasources]] > (component=[org.rhq.modules.plugins.jbossas7.DatasourceComponent@7cbe9148]) > took [17847]ms Replaces previous commit in the master:
commit b57684bf616bad1444735ceced9f764b99318d72
Author: Michael Burman <miburman>
Date: Thu Mar 3 17:21:56 2016 +0200
[BZ 1314385] Initial implementation of wfly-10 plugin (copy of jboss-as-7 plugin)
EAP plugin Update-03 DR02 does not support EAP7...
Verified for EAP6:
2016-03-10 06:28:28,526 INFO [MeasurementManager.collector-1] (rhq.core.pc.measurement.MeasurementCollectorRunner)- [PERF] Collection of measurements for [Resource[id=12148, uuid=a42e2827-cefc-4ff4-b719-01613c1f9e41, type={JBossAS7}DataSource (Standalone), key=subsystem=datasources,data-source=ExampleDS, name=ExampleDS, parent=datasources]] (component=[org.rhq.modules.plugins.jbossas7.DatasourceComponent@2406e1ed]) took [2744]ms
No warnings in rhq-agent/logs/agent.log ExampleDS resource up and measurements updated - checked in GUI. Info message as for EAP6 (JBossAS7) did not occurred.. |
Description of problem: DataSourceComponent assumes that object read from the DMR is always castable to String (and then parsed to Double for Measurement collecting). This is not the case with EAP7, which returns an Integer and causes ClassCastException. Version-Release number of selected component (if applicable): RHQ master / JON 3.3.5 How reproducible: Always with EAP7 Steps to Reproduce: 1. Start EAP7 2. Add to JON 3. Wait for ExampleDS measurements to be collected Actual results: Collection data fails with ClassCastException: 2016-02-02 14:52:58,330 WARN [MeasurementManager.collector-1] (rhq.core.pc.measurement.MeasurementCollectorRunner)- Failure to collect measurement data for Resource[id=10488, uuid=7821ca50-e30c-4e3f-a7ee-2074cdb2fbcb, type={JBossAS7}DataSource (Standalone), key=subsystem=datasources,data-source=ExampleDS, name=ExampleDS, parent=datasources] - cause: java.lang.ClassCastException:java.lang.Integer cannot be cast to java.lang.String Expected results: Measurements are correctly collected and stored in double. Additional info: