Description of problem: The RHQ server fails to create a child resource if the same resource with the same name previously existed and then was removed. The issue occurs both using REST and web UI. In case of REST query the server fails to create the resource and responds with http code 500). In case of WEB UI the message "A request to create a Resource with the name of [if-test1] has been submitted successfully," but the resource is never created and never appears in the inventory. Version-Release number of selected component (if applicable): RHQ 4.13.0-SNAPSHOT (89a2c43) How reproducible: always Steps to Reproduce: 1. Create the "Network Interface" child resource of EAP standalone server (either via UI or REST) and name it "test-interface". 2. After the resource is created uninventory it (either via UI or REST) 3. Using REST repeat step 1 (make sure you give the same name "test-interface" to the resource) 4. Check the server's response. Using UI check that the resource was not created. 5. Using WEB UI repeat step 1 (make sure you give the same name "test-interface" to the resource). 6. Using UI check that the resource was not created. Actual results: The resource is not created. UI displays message confirming that the resource was created. Expected results: Resource is created and if not the UI should reflect on that. Additional info:
(In reply to Jan Bednarik from comment #0) > 2. After the resource is created uninventory it (either via UI or REST) Did you click uninventory or delete? Uninventory does not *delete* the resource from the managed server. It justs removes it from JON's inventory. Then it is expected that when you try to create a resource with the same name, EAP refuses it. Please clarify the reproduction steps, both for UI and REST. For the latter, please attach to the BZ the script of the test case.
Closing assuming the resource was uninventoried, not deleted. Reopen if you can reproduce actually deleting the resource.
(In reply to Thomas Segismont from comment #1) > (In reply to Jan Bednarik from comment #0) > > 2. After the resource is created uninventory it (either via UI or REST) > > Did you click uninventory or delete? > > Uninventory does not *delete* the resource from the managed server. It justs > removes it from JON's inventory. Then it is expected that when you try to > create a resource with the same name, EAP refuses it. Thomas you are right, I had a look at this issue again and I used DELETE /resource/{id} in case of REST and uninventory in case of UI. As you say, this does not delete the resource from the managed server. Thus I agree with notabug resolution.