Bug 1390196

Summary: ApplicationMBeansDiscoveryComponent does not work with WildFly10
Product: [Other] RHQ Project Reporter: jorgeFigueira <jorge.figueira>
Component: PluginsAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.14   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
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 jorgeFigueira 2016-10-31 13:24:02 UTC
Description of problem:
Need some plugin to discover mbeans from wildfly 10 in wildfly 10 mbeans-on-as7-plugin example work fine but in wildfly 10 it doesn't.

Version-Release number of selected component (if applicable):
4.14

How reproducible:
Based on rhq\etc\samples\mbeans-on-as7-plugin , i made a mbean plugin to wildfly 10. 

Steps to Reproduce:
install mbeans-on-as7-plugin to discover mbeans in wildfly 10.



Actual results:
2016-10-31 12:02:43,767 WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [TEST JMX] Resources - failed after 6 ms.
java.lang.Exception: Discovery component invocation failed.
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:309)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: org.rhq.modules.plugins.wildfly10.StandaloneASComponent cannot be cast to org.rhq.modules.plugins.jbossas7.BaseComponent
	at org.rhq.modules.plugins.jbossas7.jmx.ApplicationMBeansDiscoveryComponent.discoverResources(ApplicationMBeansDiscoveryComponent.java:235)
	at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:305)
	... 4 more

Expected results:
To discover mbeans.

Additional info: