staleobjectstate

StaleObjectstateException row was updated or deleted by

百般思念 提交于 2019-11-30 06:43:34
I am getting this exception in a controller of a web application based on spring framework using hibernate. I have tried many ways to counter this but could not resolve it. In the controller's method, handleRequestInternal , there are calls made to the database mainly for 'read', unless its a submit action. I have been using, Spring's Session but moved to getHibernateTemplate() and the problem still remains. basically, this the second call to the database throws this exception. That is: 1) getEquipmentsByNumber(number) { firstly an equipment is fetched from the DB based on the 'number', which