Bug 812324 - Re-deploy of a plugin with changed resource type name and created children fails
Re-deploy of a plugin with changed resource type name and created children fails
Status: NEW
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
Unspecified Unspecified
medium Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2012-04-13 07:42 EDT by Heiko W. Rupp
Modified: 2012-04-23 10:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Stack trace from console (37.52 KB, text/plain)
2012-04-13 07:43 EDT, Heiko W. Rupp
no flags Details

  None (edit)
Description Heiko W. Rupp 2012-04-13 07:42:48 EDT
I have a plugin (as7), where I have a service "JVM-Definition". And have already created child resources of that type. Now I have changed the name to "JVM Definition". Redeploy leads to a huge stack trace with 

13:38:30,781 ERROR [ResourceMetadataManagerBean] Failure during removal of obsolete ResourceTypes and Subcategories.
java.lang.Exception: Failed to remove {jboss-as-7}JVM-Definiton.
        at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.removeResourceTypes(ResourceMetadataManagerBean.java:256)
        at org.rhq.enterprise.server.resource.metadata.ResourceMetadataManagerBean.removeObsoleteTypes(ResourceMetadataManagerBean.java:185)

caused by a foreign-key violation

13:38:30,773 ERROR [JDBCExceptionReporter] FEHLER: Aktualisieren oder Löschen in Tabelle »rhq_resource_type« verletzt Fremdschlüssel-Constraint »rhq_create_res_hist_resource_type_id_fkey« von Tabelle »rhq_create_res_hist«
  Detail: Auf Schlüssel (id)=(10471) wird noch aus Tabelle »rhq_create_res_hist« verwiesen.
Comment 1 Heiko W. Rupp 2012-04-13 07:43:41 EDT
Created attachment 577306 [details]
Stack trace from console
Comment 2 Charles Crouch 2012-04-16 12:44:48 EDT
Commented on wrong bz
Comment 3 Charles Crouch 2012-04-16 13:57:33 EDT
In fact set priority and blocking bugs incorrectly too. Fixing
Comment 4 Charles Crouch 2012-04-23 10:30:11 EDT
Setting medium as per Apr 16 BZ triage

Note You need to log in before you can comment on or make changes to this bug.