-
1. Custom Plugin Connection Properties Subtab
pilhuhn Feb 1, 2011 4:20 AM (in response to james.lopez)Hey,
this descriptor is already looking ok. For the plugin-config, you need to add
<plugin-configuration>
<c:simple-property ..... />
</plugin-configuration>
Elements to the <server> element.
Have a look at e.g.
for an example and
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=blob;f=modules/plugins/irc/src/main/java/org/rhq/plugins/irc/IRCServerDiscoveryComponent.java (starting at Line 35) on how to use this configuration.
It is also possible not to get anything from the UI set up in the properties and have stuff being added within your discovery method.
If you can discover the resource (= find it at all), you don't need a ManualAddFacet.
Also have a look at this "How to write a plugin" paper, page 18+ http://www.redhat.com/f/pdf/Write_A_Plugin_WP_web.pdf
Heiko
-
2. Custom Plugin Connection Properties Subtab
james.lopez Feb 8, 2011 8:26 AM (in response to pilhuhn)Thank you.
I should mention that I'm using JON 2.4. When I add <plugin-configuration> elements to my descriptor, the plugin won't load and the log says "no xml descriptor found." Is this because of the version I'm using?
-
3. Custom Plugin Connection Properties Subtab
pilhuhn Feb 8, 2011 8:32 AM (in response to james.lopez)RHQ 3 and JBoss ON 2.4 are compatible here. This should not be an issue.
Can you please output the full server + agent log (for the deploy , not since very start)
-
4. Custom Plugin Connection Properties Subtab
ips Feb 8, 2011 8:47 AM (in response to james.lopez)You can find many examples of plugin descriptors by unzipping any of the plugin jars that are bundled with JON (these jars live in RHQ_SERVER_HOME/jbossas/server/default/deploy/rhq.ear/rhq-plugins/) and looking at the file META-INF/rhq-plugin.xml.
-
5. Custom Plugin Connection Properties Subtab
james.lopez Feb 8, 2011 10:04 AM (in response to pilhuhn)The short of it is adding
<plugin-configuration>
<c:simple-property name="port" type="integer" default="5672"/>
</plugin-configuration>
Produces this in the server log:
2011-02-08 09:33:20,152 WARN [org.rhq.enterprise.server.core.plugin.PluginDeploymentScanner] Does not look like [/home/jhlopez/Desktop/jon-server-2.4.0.GA/plugins/MRGM-plugin-3.0.0.jar.fixme] is a plugin jar -(Cause: java.lang.NullPointerException:no xml descriptor found in jar). It will be ignored. Please fix that file or remove it.
So it doesn't get deployed or make an appearance in the agent log. Can this error be caused by anything besides an invalid xml descriptor?
-
6. Custom Plugin Connection Properties Subtab
mazz Feb 8, 2011 10:44 AM (in response to james.lopez)Its either an invalid XML or it isn't found explicitly at META-INF/rhq-plugin.xml.
There are XML schemas (.xsd) available - load them up in your XML editor and verify that your plugin .xml file is validated via the schema.
Here's the location of the two .xsd schemas needed to validate plugin descriptors (there is one main schema plus the configuration schema that is used to validate the config elements - you need both to fully validate a plugin descriptor)
-
7. Re: Custom Plugin Connection Properties Subtab
pilhuhn Feb 8, 2011 10:46 AM (in response to james.lopez)James,
this sounds more like a build issue where the jar job is not including the plugin descriptor.
If you unzip your plugin-jar, it should look like
META-INF/rhq-plugin.xml
do/main/DiscoveryClass.class
do/main/FooClass.class
...
IF you are on windows, make sure META-INF is all uppercase