Created attachment 397268 [details] sample queue Description of problem: I have deployed a queue and it got discovered by JON. Then I have removed that queue manually (deleted from the deploy dir). First of all this error showed up in the EAP server log (I wasn't able to reproduce it again): 02:59:51,384 INFO [QueueService] Queue[/queue/my_test_queue] stopped 03:02:30,255 ERROR [InventoryManager] Call to getAvailablity() on ResourceComponent for Resource[id=-11, type=Queue, key=/queue/my_test_queue, name=my_test_queue, parent=JBoss EAP 5 (production)] failed. java.lang.IllegalStateException: Failed to find [ComponentType{type=JMSDestination, subtype=Queue}] ManagedComponent named [/queue/my_test_queue]. at org.rhq.plugins.jbossas5.ManagedComponentComponent.getManagedComponent(ManagedComponentComponent.java:367) at org.rhq.plugins.jbossas5.ManagedComponentComponent.getAvailability(ManagedComponentComponent.java:110) at sun.reflect.GeneratedMethodAccessor344.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Right after that the whole server (with all its resources) was marked as down in JON for a couple of minutes. After all went green again, I went to INVENTORY and displayed the deleted queue - it was marked as DOWN. When I tried to delete it I got this: JON server log: 2010-03-02 03:12:12,940 INFO [org.rhq.enterprise.server.resource.ResourceFactoryServerServiceImpl] Received delete resource response: DeleteResourceResponse[RequestId=10001, Status=Failure] JON agent log: 2010-03-02 03:12:12,865 INFO [ResourceFactory.executor-1] (rhq.core.pc.inventory.DeleteResourceRunner)- Deleting resource from request: 10001 Failure displayed in the GUI: java.lang.IllegalStateException: Failed to find [ComponentType{type=JMSDestination, subtype=Queue}] ManagedComponent named [/queue/my_test_queue]. at org.rhq.plugins.jbossas5.ManagedComponentComponent.getManagedComponent(ManagedComponentComponent.java:367) at org.rhq.plugins.jbossas5.ManagedComponentComponent.deleteResource(ManagedComponentComponent.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Version-Release number of selected component (if applicable): JON-2.3.1 GA jon-plugin-pack-eap-2.3.1.GA EAP 5.0.0 (http://porkchop.devel.redhat.com/released/JBEAP-5.0/5.0.0.GA/zip/jboss-eap-5.0.0.GA.zip) How reproducible: Steps to Reproduce: 1. Install JON, Agent, EAP5, deploy a sample queue (attached), discover EAP in JON 2. delete the sample queue (manually or through the admin console) 3. verify resource goes down in JON and try to delete it Actual results: A failure is displayed (see above) Expected results: Resource is deleted Additional info:
In this situation you want to "UNINVENTORY" such an item, not delete it. Delete is like "Undeploy". However, in case described here, the resource was already undeployed and therefore, can not be undeployed a second time. Instead, uninevntory will remove a resource from inventory. However, this situation should probably be better handled. For example, inform the user of a meaningful error condition and then ask them if they want to remove it from inventory.