Bug 1103546

Summary: NonUniqueException when updating a content spec
Product: [Community] PressGang CCMS Reporter: Matthew Casperson <mcaspers>
Component: CCMS-CoreAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.6CC: cbredesen, lnewson
Target Milestone: ---   
Target Release: 1.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-22 21:32:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1092170    

Comment 4 Lee Newson 2014-06-02 07:15:08 UTC
Fixed in 1.7-SNAPSHOT build 201406021653

There was two parts to this issue:

The first was a bug in envers that was causing the audit events to be retained when a rollback occurred which means using the same entity manager twice would mean that the events would be persisted when they shouldn't have been. This was the cause for the NonUniqueException.

The second was the way that info nodes were being updated. The deleted node wasn't getting removed which meant that it was trying to set the removed/changed info nodes ContentSpecNodeID to null. This was the cause of the foreign key exception.

Note: This version has been deployed to the test/development server.

Comment 5 Lee Newson 2014-06-02 07:17:44 UTC
For the envers bug it was fixed in hibernate 4.2.1.Final. Since this isn't available in AS7 or until EAP 6.2 we've implemented a workaround which is to make sure that we don't reuse the same entity manager twice.

Comment 6 Matthew Casperson 2014-06-16 21:12:43 UTC
Reran the curl commands and the resulting spec was editable in the UI.