org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session

This is because, there is already an object with the same primary key in the hibernate session.
Unless it is detached from the session, it wont allow another object with the same primary key.

This case pretty commonly comes when we use SaveOrUpdate() method.
Use Merge() method instead in this case.

A nice write up on this.