Having made that change, the agent logs this error:
2010-11-18 16:22:23,961 ERROR [InventoryManager.discovery-1]
(rhq.core.pc.inventory.RuntimeDiscoveryExecutor)- Unable to obtain discovery component for
[ResourceType[id=0, category=Server, name=Initiate JMX server, plugin=Initiate Hub]]
org.rhq.core.clientapi.agent.PluginContainerException: Plugin class was 'null'
using loader
[PluginClassLoader@4b794b79[parent=PluginClassLoader@5d2b5d2b[parent=org.rhq.core.pc.plugin.RootPluginClassLoader@74157415,embedded-dir=[file:/opt/rhq/rhq-agent/data/tmp/rhq-jmx-plugin-3.0.0.jar28960.classloader/],urls=[file:/opt/rhq/rhq-agent/plugins/rhq-jmx-plugin-3.0.0.jar,org-mc4j-ems-1.2.11.jar28961.tmp]],embedded-dir=[<>],urls=[file:/opt/rhq/rhq-agent/plugins/initiate-empi.jar]]]
I expected that the "depends " attribute caused this plugin to inherit the
discovery of the JMX plugin.
Here is the descriptor now:
Al Amyot | Consultant
Sierra Systems
(eHealth): 204-926-4257 (T): 204-942-2575 (F): 204-942-2047
444 St. Mary Avenue, Suite 1050
Winnipeg, MB R3C 3T1
Management Consulting | System Integration | Managed Services
website:
www.SierraSystems.com
-----Original Message-----
From: rhq-users-bounces(a)lists.fedorahosted.org
[mailto:rhq-users-bounces@lists.fedorahosted.org] On Behalf Of John Mazzitelli
Sent: Thursday, November 18, 2010 4:07 PM
To: rhq-users(a)lists.fedorahosted.org
Subject: Re: Custom JMX plugin problems
Yeah, but in the custom jmx demo case, that <service> is the top level resource.
In your case, your top level resource (<server name="Initiate JMX
server">) doesn't have the <runs-inside> in it. But your child service
does - which doesn't make sense because the child <service> by definition runs
inside the parent <server> where its declared. We should probably spit out a warning
of some sort if we detect this - I don't think it makes sense to put a
<runs-inside> inside of anything other than a top-level resource.
In fact, our documents allude to this - read here:
http://rhq-project.org/display/RHQ/AMPS-Plugin+Extensions#AMPS-PluginExte...
where it says
"Injection: A root level <server> or <service> can have a
<runs-inside> element. "
Also notice the "For the future" yellow box where it asks if we would want to
allow for a non-root-level type to accept runs-inside.
So while not explicitly saying so, they infer that you can't have runs-inside in
anything other than a root-level (aka top-level) type.
On 11/18/2010 04:57 PM, Al Amyot wrote:
Here's the same section from the Plugin Demo - Writing Custom
JMX
Plugin:
<service name="First Custom Service"
description="Our first MBean custom service whose 'id' is
static"
discovery="org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent"
class="org.rhq.plugins.jmx.MBeanResourceComponent">
<runs-inside>
<parent-resource-type name="JMX Server"
plugin="JMX"/>
<parent-resource-type name="JBossAS Server"
plugin="JBossAS"/>
</runs-inside>
I just followed the above example.
I did find one error but fixing it had no effect:
<c:simple-property name="descriptionTemplate" default="Initiate Hub
{engine} on port {port} Interaction [interaction}"/> should be:
<c:simple-property name="descriptionTemplate" default="Initiate Hub
{engine} on port {port} Interaction {interaction}"/> Notice the
erroneous "["
Al Amyot | Consultant
Sierra Systems
(eHealth): 204-926-4257 (T): 204-942-2575 (F): 204-942-2047
444 St. Mary Avenue, Suite 1050
Winnipeg, MB R3C 3T1
Management Consulting | System Integration | Managed Services
website:
www.SierraSystems.com
-----Original Message-----
From: rhq-users-bounces(a)lists.fedorahosted.org
[mailto:rhq-users-bounces@lists.fedorahosted.org] On Behalf Of John
Mazzitelli
Sent: Thursday, November 18, 2010 3:51 PM
To: rhq-users(a)lists.fedorahosted.org
Subject: Re: Custom JMX plugin problems
The runs inside:
> <runs-inside>
> <parent-resource-type name="JMX Server" plugin="JMX"/>
> </runs-inside>
looks to be out of place no? Shouldn't that be inside the<server>
element, not inside the child<service> element?
Unsure if that's the cause of your problem, but that's the thing that
jumped out at me when I looked.
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
This email and/or any documents in this transmission is intended for
the
addressee(s) only and may contain legally privileged or confidential information. Any
unauthorized use, disclosure, distribution, copying or dissemination is strictly
prohibited. If you receive this transmission in error, please notify the sender
immediately and return the original.
Ce courriel et tout document dans cette transmission est destiné à la personne ou aux
personnes à qui il est adressé. Il peut contenir des informations privilégiées ou
confidentielles. Toute utilisation, divulgation, distribution, copie, ou diffusion non
autorisée est strictement défendue. Si vous n'êtes pas le destinataire de ce message,
veuillez en informer l'expéditeur immédiatement et lui remettre l'original.
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
This email and/or any documents in this transmission is intended for the
addressee(s) only and may contain legally privileged or confidential information. Any
unauthorized use, disclosure, distribution, copying or dissemination is strictly
prohibited. If you receive this transmission in error, please notify the sender
immediately and return the original.
Ce courriel et tout document dans cette transmission est destiné à la personne ou aux
personnes à qui il est adressé. Il peut contenir des informations privilégiées ou
confidentielles. Toute utilisation, divulgation, distribution, copie, ou diffusion non
autorisée est strictement défendue. Si vous n'êtes pas le destinataire de ce message,
veuillez en informer l'expéditeur immédiatement et lui remettre l'original.