Bug 812324 - Re-deploy of a plugin with changed resource type name and created children fails
Summary: Re-deploy of a plugin with changed resource type name and created children fails
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 4.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified vote
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-13 11:42 UTC by Heiko W. Rupp
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


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

Description Heiko W. Rupp 2012-04-13 11:42:48 UTC
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 11:43:41 UTC
Created attachment 577306 [details]
Stack trace from console

Comment 2 Charles Crouch 2012-04-16 16:44:48 UTC
Commented on wrong bz

Comment 3 Charles Crouch 2012-04-16 17:57:33 UTC
In fact set priority and blocking bugs incorrectly too. Fixing

Comment 4 Charles Crouch 2012-04-23 14:30:11 UTC
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.