Bug 1247343 - HHH-8456 Hibernate Envers throws RuntimeException in ValidityAuditStrategy when no audit records (table partitioning)
HHH-8456 Hibernate Envers throws RuntimeException in ValidityAuditStrategy wh...
Status: CLOSED WONTFIX
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate (Show other bugs)
6.3.2
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Gail Badner
Martin Simka
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-27 15:29 EDT by Alexandre Cavalcanti
Modified: 2015-10-13 05:46 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-13 05:46:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log of the exception (4.29 KB, text/plain)
2015-07-27 15:29 EDT, Alexandre Cavalcanti
no flags Details

  None (edit)
Description Alexandre Cavalcanti 2015-07-27 15:29:23 EDT
Created attachment 1056732 [details]
Log of the exception

1. Proposed title of this feature request

Not throwing that RuntimeException based on a configuration in persistence.xml

2. Who is the customer behind the request?
     Account: PROCERGS - Companhia de Processamento de Dados do Rio Grande do Sul (acct #633668)
     TAM customer: yes (Platform only)
     SRM customer: yes
     Strategic: yes
3. What is the nature and description of the request?

Customer is having the problem below:

*********
In Hibernate Envers (persistence.xml), I enabled the strategy for table partitioning, according to the development guide: 
http://docs.jboss.org/hibernate/orm/4.2/devguide/en-US/html/ch15.html#envers-partitioning

The class: ValidityAuditStrategy, throws RuntimeException when there is no audit record. This exception occurs when the Envers try to update an audit record with a date of final revision (revend_tstmp), but this audit record does not exist.

The database of my application receives data load from external applications and is not possible change these external applications to include their audit records.

In method ValidityAuditStrategy#updateLastRevision:

if (l.size() == 1) {
  //... doStuff - OK
} else {
  throw new RuntimeException("Cannot find previous revision for entity " + auditedEntityName + " and id " + id);
}
*********

In order to solve this problem he asked for a way to not throwing that RuntimeException based on a configuration in persistence.xml (for example)

Customer stated a similiar issue with no solution in: https://developer.jboss.org/thread/160195?tstart=0

4. Why does the customer need this? (List the business requirements here)

Red Hat doesn't have a suitable workaround for this issue

5. How would the customer like to achieve this? (List the functional requirements here)

He asked for a way to not throwing that RuntimeException based on a configuration in persistence.xml (for example)

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

Customer can run in their environment to test
Red Hat can replicate customer envirnment

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

No

8. Does the customer have any specific time-line dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

No

9. Is the sales team involved in this request and do they have any additional input?

No

10. List any affected packages or components.

Hibernate Envers 4.2.12.Final

11. Would the customer be able to assist in testing this functionality if implemented?

Yes
Comment 2 Gail Badner 2015-07-30 23:07:05 EDT
https://hibernate.atlassian.net/browse/HHH-8456

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