Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 601144 - Hibernate exception throw when updating configuration
Hibernate exception throw when updating configuration
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Configuration (Show other bugs)
3.0.0
All Linux
high Severity high (vote)
: ---
: ---
Assigned To: John Sanda
Corey Welton
:
Depends On:
Blocks: jon-sprint11-bugs
  Show dependency treegraph
 
Reported: 2010-06-07 06:23 EDT by John Sanda
Modified: 2010-06-17 14:19 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-17 14:19:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sanda 2010-06-07 06:23:35 EDT
Description of problem:
A HibernateException with the following error message is getting thrown when updating a configuration,

org.hibernate.HibernateException: A
collection with cascade="all-delete-orphan" was no longer referenced by the
owning entity instance: org.rhq.core.domain.configuration.PropertyMap.map

This issue was initially found in bug 586943 in which a group resource configuration update was failing. It was later encountered again in bug 600365 in which a group plugin configuration update was failing. For both of these bugs, we worked around the exception by creating a deep copy of the configuration object, stripping it of any hibernate proxies in the process. We have not yet been able to determine where/when a collection with cascade="all-delete-orphan" is getting dereferenced. It is quite possible that we will see this exception again somewhere else.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 John Sanda 2010-06-17 14:19:56 EDT
I have done a good bit of investigation and although I have precisely pinpoint the problem, I have learned several things. First, the underlying causes of bug 586943 and bug 60035 is not related specifically to group config update operations. In the case of a group resource config update, it is a scheduled job that calls ConfigurationManagerBean.executeResourceConfigurationUpdate(int). That method in turn does a couple things. First it fetches the ResourceConfigurationUpdate object for the specified id. It then calls the agent remoting service.

I modified my local copy of ResourceConfigurationViewer to call ConfigurationManagerBean.executeResourceConfigurationUpdate() any time a configuration is loaded which happens any time you go to view a resource configuration. Sure enough this triggered the hibernate exception.

Commenting out the call to the agent service which is on/around 1102 in ConfigurationManagerBean and looks like,

agentClient.getConfigurationAgentService().updateResourceConfiguration(request)

causes the exception not to be thrown. I have not been able to reproduce the exception in an automated test. So at this point, we know that somehow, somewhere instances of PropertyList and PropertyMap are getting dereferenced from their parent Configuration objects, but we do not know we precisely why.

Since a considerable amount of time has already been spent investigating this and since we have a work around in creating a deep copy of the Configuration object, I am closing this out as WONTFIX.

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