I ran into this problem today with hibernate-envers-4.3.10.Final. A transaction failed because of a NullPointerException and it took some time to figure out that the issue was the missing @Audited annotation on the subclass. I would be glad if the @Audited annotation is inherited or at least a meaningful exception is thrown.
My code looks like this:
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(...)
@Audited
public class A
@Entity
@DiscriminatorValue(...)
public class B extends A
NullPointerException at BaseEnversEventListener: 123
final IdMapper idMapper = enversConfiguration.getEntCfg().get( toEntityName ).getIdMapper();
|