[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4041) Null Pointer Exception when using @NotAudited on an entity with discriminator column, inherited from base entity with InheritanceType.SINGLE_TABLE

Priya M (JIRA) noreply at atlassian.com
Thu Jul 16 13:50:12 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33619#action_33619 ] 

Priya M commented on HHH-4041:
------------------------------

Please close this issue. I'm able to add @NotAudited now. (Not sure what the original bug was)

> Null Pointer Exception when using @NotAudited on an entity with discriminator column, inherited from base entity with InheritanceType.SINGLE_TABLE
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-4041
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4041
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: envers
>    Affects Versions: 3.3.1
>            Reporter: Priya M
>
> Using latest Envers version -- 1.2.1GA
> This is my mapping:
> @Entity
> @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
> class Foo {
> }
> @Entity
> @DiscriminatorValue("bar")
> class Bar {
> }
> @Entity
> @Audited
> class FooBarTest {
>    @NotAudited
>     Bar bar;
> }
> I get a NPE exception!
> Caused by: java.lang.NullPointerException
> 	at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateInheritanceMappingData(AuditMetadataGenerator.java:305)
> 	at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateFirstPass(AuditMetadataGenerator.java:349)
> 	at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:87)
> 	at org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:86)
> 	at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99)
> 	at org.hibernate.envers.event.AuditEventListener.initialize(AuditEventListener.java:260)
> 	at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
> 	at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
> 	at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
> Right now, I'm forced to make Foo as @Audited even though I don't intend to.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list