I am using hibernate, spring, struts framework for my application.
In my application, each of the table has one field called as Version for tracking updation of any records.
Whenever i am updating existing record of my Country table which has version 0, it works fine & update the record update the version field to 1.
But whenever i am trying to update that version 1 record, it gives me error as follows:
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.sufalam.business.marketing.model.bean.Country] with identifier : optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.sufalam.business.marketing.model.bean.Country#3]