Red Hat Bugzilla – Bug 752761
Deleting an EAR/WAR fails with UnsupportedOperationException
Last modified: 2014-09-11 13:38:52 EDT
+++ This bug was initially created as a clone of Bug #672240 +++
Description of problem:
After performing a farmed deployment I tried to delete the WAR via RHQ using Content...Deployed...Delete and I get errors, "UnsupportedOperationException: Cannot remove the package backing an EAR/WAR resource."
Version-Release number of selected component (if applicable):
JON 3.0 Beta1
Steps to Reproduce:
1. Deploy helloworld.war as farmed (probably happens else where too)
2. Delete helloworld.war resource via RHQ.
java.lang.UnsupportedOperationException: Cannot remove the package backing an EAR/WAR resource.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Created attachment 532786 [details]
Image showing result
The WAR or EAR package associated with a WAR or EAR Resource is considered that Resource's "backing package". A Resource's backing package cannot be deleted, as this would make the Resource defunct since its underlying WAR or EAR would no longer exist.
So this is the expected behavior and it has been this way since JON 2.0. I admit it is confusing. Perhaps we should not list the backing package on the Content>Deployed subtab, or list if but disable the delete action for it. The content subsystem is full of such non-intuitive things, but I don't think it's a priority right now to address them.