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
|