9 Replies Latest reply on Feb 15, 2010 10:27 AM by mazz

    spurious error

    ataylor

      Hi, I am testing my hornetq plugin in jopr and i see the following error which doesn't really give me any clue as to the underlying problem. Does anyone have a clue to what is happening, also is there a way of viewing better logging from jopr when this sort of thing occurs.

       

      Thanks in Advance

       

      Unable to connect to the Agent. Cause: javax.ejb.EJBException:java.lang.RuntimeException: Error adding HornetQ Server resource to inventory as a child of the resource with id 10001 - cause: Server specified unknown Resource type: ResourceType[id=0, category=null, name=HornetQ Server, plugin=HornetQ] -> java.lang.RuntimeException:Error adding HornetQ Server resource to inventory as a child of the resource with id 10001 - cause: Server specified unknown Resource type: ResourceType[id=0, category=null, name=HornetQ Server, plugin=HornetQ] -> java.lang.IllegalStateException:Server specified unknown Resource type: ResourceType[id=0, category=null, name=HornetQ Server, plugin=HornetQ]

        • 1. Re: spurious error
          pilhuhn

          Andy,

           

          I've never seen that before..

           

          Did you upload your plugin to the server first and deploy it there and then download into the agent via

          plugins update?

          The error message looks to me like the server does no know about this plugin and the HortneQ resource

          type.

          If you did follow the above steps: did you rename the resource type from some previous version?

          If so, please wipe the database.

          • 2. Re: spurious error
            ataylor

            I uploaded the plugin and updated the plugin. I get this when i try to manually add. I am not sure what you mean by resource type, is this the name, my config for the server is:

             

            <plugin name="HornetQ"
                    displayName="HornetQPlugin"
                    description="Supports management and monitoring of HornetQ Servers"
                    package="org.jboss.as.integration.hornetq.jopr"
                    version="2.1.3"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns="urn:xmlns:rhq-plugin"
                    xmlns:c="urn:xmlns:rhq-configuration">

            • 3. Re: spurious error
              ataylor

              I have cleaned the database and reinstalled everything, Now i get the following:

               

              An unexpected error occurred in the Agent. Cause: org.rhq.core.clientapi.agent.PluginContainerException:The [HornetQ] plugin does not support manual addition of [HornetQ Server] resources.

               

              even tho ManualAdd is set to true

              • 4. Re: spurious error
                pilhuhn

                Andy,

                ResourceType is encoded e.g. in <server name=HornetQ"> - this defines a resource type of "HornetQ" with ResourceCategory of "Server".

                 

                When using manualAdd, you also need the matching code in the DiscoveryClass -- see e.g.

                http://pilhuhn.blogspot.com/2009/09/new-api-for-manual-discovery-on-rhq-and.html

                • 5. Re: spurious error
                  pilhuhn

                  Can you post more of the source - or link us to some repo, so we can have a look at it in order to help you?

                   

                  Thanks

                    Heiko

                  • 6. Re: spurious error
                    ataylor
                    I have implemented the manualAddFacet interface but still get the same error. you can see all the code at http://anonsvn.jboss.org/repos/jbossas/branches/Branch_Hornet_Temporary_2/hornetq-int. This is a branch to integrate HornetQ with the AS altho we may pull the jopr code into the HornetQ trunk depending.
                    • 7. Re: spurious error
                      ataylor

                      actually i didnt realise that all the discovery components have to implement this not just the top level one. anyway, now i an getting:

                       

                      An unexpected error occurred in the Agent. Cause: java.lang.NoClassDefFoundError:org/rhq/core/pluginapi/inventory/ManualAddFacet -> java.lang.ClassNotFoundException:org.rhq.core.pluginapi.inventory.ManualAddFacet

                       

                      I am using jopr server 2.3.1

                      • 8. Re: spurious error
                        pilhuhn

                        ManualAddFacet is unfortunately only available in RHQ 1.4.0.B01 and the RHQ 3.0.0.B* builds.

                        The other article that is linked from the one I've linked above shows how to implement this in Jopr 2.3.1 and earlier.

                        Should have mentioned this ...

                         

                          Heiko

                        • 9. Re: spurious error
                          mazz
                          Andy - if you want - hop on #rhq on freenode - we can discuss in realtime to help you get over the hump here. It sounds like you had it correct before, but you just didn't have the plugins updated properly on both the server and agent. Should not be difficult to get that working, just a matter of making sure the plugins are updated on the agent after successfully deploying inside the server.