-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Envers - Queries
PostPosted: Wed Dec 31, 2008 6:11 am 
Newbie

Joined: Tue Dec 09, 2008 6:55 am
Posts: 12
Hi,

I'm using the hibernate-envers-3.4.0-SNAPSHOT.jar with Hibernate 3.3.1

Please help me out with the following queries -

1. Is it compulsory to use the AnnotationConfiguration with Envers? I have defined all my mappings in xml files and was using Configuration but i started getting ClassCastException in AuditConfiguration.

2. I tried running the Ant task to generate the schema for the audit tables but I just cant get it to work. The schema for my entities are generated but none of the Audit tables are. I have used the org.hibernate.tool.ant.EnversHibernateToolTask class. Is it related to the fact that I'm not using Annotations?

3. 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. Again, I'm not sure if this is related to Annotations. The only time it worked was while saving a new record.

4. By when will Envers be released as a full-fledged component?

Thanks.

Regards
Kaizer


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.