-->
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.  [ 2 posts ] 
Author Message
 Post subject: Envers not working?
PostPosted: Sun Jun 27, 2010 6:28 pm 
Newbie

Joined: Wed Jun 23, 2010 7:23 am
Posts: 8
Hi All
i am trying to work with envers and hibernate 3.5.3 and issue is that it is creating the _aud tables that it is supposed to but when I try ot update the pojo object that has the @audited annotation on it. There is no insert happenign in the _aud table. the values get saved in the DB for the pojo and everything else is working as it was before envers but envers is not working. It does create the audit table for the audited object.

I am using jboss 5.1 and spring and hibernate 3.5.3. I have also registered the listeners in my hibernate.cfg.xml
Code:
  <listener class="org.hibernate.envers.event.AuditEventListener" type="post-insert"/>
          <listener class="org.hibernate.envers.event.AuditEventListener" type="post-update"/>
          <listener class="org.hibernate.envers.event.AuditEventListener" type="post-delete"/>
         <listener class="org.hibernate.envers.event.AuditEventListener" type="pre-collection-update"/>
          <listener class="org.hibernate.envers.event.AuditEventListener" type="pre-collection-remove"/>
          <listener class="org.hibernate.envers.event.AuditEventListener" type="post-collection-recreate"/>
      


I am sure this is how you register your listeners within the session-factory tag in the hibernate.cfg.xml

Is there something about spring that when i use the hibernateTemplate.update(); that it doesnot see this event hapening.??
Will appreciate your help. Thanks.


Top
 Profile  
 
 Post subject: Re: Envers not working?
PostPosted: Sun Jan 09, 2011 6:58 pm 
Newbie

Joined: Sun Jan 09, 2011 6:51 pm
Posts: 2
I have exactly the same problem. Did you find any solution?
My audit table are correctly created but none of them are inserted. I can see REVINFO table to be updated but _AUD tables are empty.
I am also using Spring, Hibernate, etc. I see events being called when I debug, I just cannot figure out why it's not persisting audit tables yet.


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

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.