This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes

Bug 861239

Summary: ResourceManager.getLiveResourceAvailability fails due to PersistentObjectException: detached entity passed to persist: org.rhq.core.domain.configuration.definition.ConfigurationDefinition
Product: [Other] RHQ Project Reporter: Larry O'Leary <loleary>
Component: CLIAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2CC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.6   
Hardware: All   
OS: All   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 861237 Environment:
Last Closed: 2013-09-03 10:42:48 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 861237    

Description Larry O'Leary 2012-09-27 17:55:04 EDT
+++ This bug was initially created as a clone of JBoss ON Bug #861237 +++

Description of problem:
Can not execute ResourceManager.getLiveResourceAvailability from CLI or Remote API due to:

Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: org.rhq.core.domain.configuration.definition.ConfigurationDefinition
	at org.hibernate.event.def.DefaultPersistEventListener.onPersist(
	at org.hibernate.impl.SessionImpl.firePersistOnFlush(
	at org.hibernate.impl.SessionImpl.persistOnFlush(
	at org.hibernate.engine.CascadingAction$9.cascade(
	at org.hibernate.engine.Cascade.cascadeToOne(
	at org.hibernate.engine.Cascade.cascadeAssociation(
	at org.hibernate.engine.Cascade.cascadeProperty(
	at org.hibernate.engine.Cascade.cascade(
	at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(
	at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(
	at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(
	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(
	at org.hibernate.impl.SessionImpl.flush(
	at org.hibernate.impl.SessionImpl.managedFlush(
	at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(
	... 101 more

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

How reproducible:

Steps to Reproduce:
1. Install JON system and add one or more resources to inventory
2. Locate a valid resource ID for a resource in inventory - probably 10001
3. Execute the following from the JON CLI:


Actual results:
        Wrapped java.lang.RuntimeException: [Warning] javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state (<Unknown source>#1)

Expected results:
The live availability for the resource with ID 10001 (in my case Platform).
Comment 1 Heiko W. Rupp 2012-11-19 06:02:13 EST
Master 23be83c54ea7c
Comment 2 Heiko W. Rupp 2013-09-03 10:42:48 EDT
Bulk closing of issues in old RHQ releases that are in production for a while now.

Please open a new issue when running into an issue.