[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3705) NPE encountered on using AnnotationConfiguration
Daniel Jimenez (JIRA)
noreply at atlassian.com
Mon Apr 20 14:19:17 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32935#action_32935 ]
Daniel Jimenez commented on HHH-3705:
-------------------------------------
Adam,
Did this fix make it in envers 1.2.0GA? I'm still seeing this issue in 1.2.0GA with Hibernate 3.3.1GA.
Thanks!,
Daniel
> NPE encountered on using AnnotationConfiguration
> ------------------------------------------------
>
> Key: HHH-3705
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3705
> Project: Hibernate Core
> Issue Type: Bug
> Components: envers
> Affects Versions: 3.3.1
> Reporter: Kaizer
> Assignee: Adam Warski
> Fix For: 3.5
>
> Attachments: Hibernate_AnnotationTest.zip
>
>
> I have a bidirectional association between a Client and a ClientAddress. When I load a Client, the reference of Client set in the ClientAddress is Client_$$_javassist_0 which I think is the proxy. Now when I update or delete the client, I get a NPE -
> Exception in thread "main" java.lang.NullPointerException
> at org.hibernate.envers.event.AuditEventListener.generateBidirectionalCollectionChangeWorkUnits(AuditEventListener.java:107)
> at org.hibernate.envers.event.AuditEventListener.onPostDelete(AuditEventListener.java:153)
> at org.hibernate.action.EntityDeleteAction.postDelete(EntityDeleteAction.java:150)
> at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:117)
> at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
> at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)
> at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
> at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
> This is because the entry in the EntitiesConfigurations Map is of Client and not Client_$$_javassist_0.
> This works perfectly fine on moving to JPA (EntityManager, etc).
> I have attached a test case for the same. The DB settings will need to be changed. The above exception is encountered on running the deleteClient method in HibernateAnnotationTest.java.
--
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