NullPointerException when reading an audited entity that has a collection of embeddables with a ManyToOne to an unaudited entity.

Description

When using an audited entity collection of an embeddable:

This causes a NullPointerException to occur when fetching a revision of the Parent entity when the embeddable Item contains a non-null reference to Type, which is not audited. This is only an issue when the embeddable class holds a reference to a non-audited entity.

Environment

None

Activity

Show:
Chris Cranford
November 2, 2016, 3:05 PM

Based on porting your test case, it looks like the NullPointerException is thrown from:

Does that seem right based on your observation ?

Dmitriy Sulimchuk
November 7, 2016, 1:06 PM

Yes, exceptition thrown out from org.hibernate.envers.exception.AuditException: java.lang.NullPointerException

Gail Badner
June 23, 2017, 10:32 PM

Fixed in 5.1 branch as well.

Assignee

Chris Cranford

Reporter

Dmitriy Sulimchuk

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Critical
Configure