-->
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: hibernate listener issue while using the audit logging
PostPosted: Thu Jun 25, 2009 6:50 am 
Newbie

Joined: Thu Jun 25, 2009 6:34 am
Posts: 1
Hi,

I am using the hibernate listener using the code available in the below link
https://www.hibernate.org/318.html

org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.test.login.UserProfile#14]
org.hibernate.engine.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:556)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:259)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:217)
org.hibernate.event.def.DefaultUpdateEventListener.performSaveOrUpdate(DefaultUpdateEventListener.java:33)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
org.hibernate.impl.SessionImpl.fireUpdate(SessionImpl.java:564)

why this behaviour happened ?

Any issue with below code in the sample.
StatelessSession session = event.getPersister().getFactory().openStatelessSession();
session.beginTransaction();

or we need to go to interceptor concepts ? Experts pls help on this.

Thanks Bala


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.