Bug 900346 (JBPAPP6-901)
Summary: | ParentAuditing Test in Envers Testsuite fails across all databases with different error messages because Hibernate does not set LockMode correctly | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Madhumita Sadhukhan <msadhukh> |
Component: | Hibernate | Assignee: | Strong Liu <stliu> |
Status: | CLOSED NEXTRELEASE | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.0.0 | CC: | msadhukh, pslavice, steve, zroubali |
Target Milestone: | --- | ||
Target Release: | EAP 6.0.1 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://jira.jboss.org/jira/browse/JBPAPP6-901 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-10-29 05:47:24 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: | 900612 |
Description
Madhumita Sadhukhan
2012-05-02 12:30:34 UTC
Workaround Description: Added: On Oracle Dbs: ErrorMessage: Caused by: java.sql.SQLSyntaxErrorException: ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc. at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133) Query at error:select parententi0_.id as id1378_, parententi0_.REV as REV1378_, parententi0_.REVTYPE as REVTYPE1378_, parententi0_.REVEND as REVEND1378_, parententi0_.data as data1378_, parententi0_.numVal as numVal1379_, parententi0_.clazz_ as clazz_ from ( select id, REV, REVTYPE, REVEND, data, null as numVal, 0 as clazz_ from ParentEntity_AUD union all select id, REV, REVTYPE, REVEND, data, numVal, 1 as clazz_ from ChildEntity_AUD ) parententi0_ where parententi0_.id=? and (parententi0_.REVEND is null) for update Such a query cannot be handled by Oracle. As there is a union the query will get rid of duplicates and hence the resulting set is not updateable. Workaround Description: Removed: On Oracle Dbs: ErrorMessage: Caused by: java.sql.SQLSyntaxErrorException: ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc. at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133) Query at error:select parententi0_.id as id1378_, parententi0_.REV as REV1378_, parententi0_.REVTYPE as REVTYPE1378_, parententi0_.REVEND as REVEND1378_, parententi0_.data as data1378_, parententi0_.numVal as numVal1379_, parententi0_.clazz_ as clazz_ from ( select id, REV, REVTYPE, REVEND, data, null as numVal, 0 as clazz_ from ParentEntity_AUD union all select id, REV, REVTYPE, REVEND, data, numVal, 1 as clazz_ from ChildEntity_AUD ) parententi0_ where parententi0_.id=? and (parententi0_.REVEND is null) for update Could not disagree more about Hibernate switching to an alternate lock type. This is a lock type the user has explicitly requested. In terms of Envers usage, *maybe* we somehow allow Envers to decide between different lock types to achieve whatever it is trying to achieve here. We'll have to discuss with Adam and Lukasz to understand the intent here a little better. Link: Added: This issue is a dependency of JBPAPP-8827 Link: Added: This issue is a dependency of JBPAPP-9292 Link: Removed: This issue is a dependency of JBPAPP-8827 Release Notes Docs Status: Added: Documented as Resolved Issue Release Notes Text: Added: The <code>ParentAuditing</code> test in Hibernate Envers failed across all databases with different messages because the LockMode was not set correctly. The Hibernate code was updated to fix this issue, and the LockMode is now set correctly. Affects: Added: Release Notes Verified. Writer: Added: mistysj Release Notes Text: Removed: The <code>ParentAuditing</code> test in Hibernate Envers failed across all databases with different messages because the LockMode was not set correctly. The Hibernate code was updated to fix this issue, and the LockMode is now set correctly. Added: The `ParentAuditing` test in Hibernate Envers failed across all databases with different messages because the `LockMode` was not set correctly. The Hibernate code was updated to fix this issue, and the `LockMode` is now set correctly. Release Notes Docs Status: Removed: Documented as Resolved Issue Writer: Removed: mistysj Release Notes Text: Removed: The `ParentAuditing` test in Hibernate Envers failed across all databases with different messages because the `LockMode` was not set correctly. The Hibernate code was updated to fix this issue, and the `LockMode` is now set correctly. Docs QE Status: Removed: NEW |