If you are catching that exception, where is your method in the call stack?
Code:
ERROR - 21 Jul 2006 10:57:47,740:org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.integrosys.etreasury.app.alert.OBAlert#2004071500000351]
at org.hibernate.persister.entity.BasicEntityPersister.check(BasicEntityPersister.java:1456)
at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:1999)
at org.hibernate.persister.entity.BasicEntityPersister.updateOrInsert(BasicEntityPersister.java:1923)
at org.hibernate.persister.entity.BasicEntityPersister.update(BasicEntityPersister.java:2163)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:75)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:137)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:675)
at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:827)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:530)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:390)
at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:256)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:67)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy11.updateAlert(Unknown Source)
Which line is yours? If it's not there, then you are not catching that particular exception. This particular exception is being thrown from somewhere that you're not catching. Possibly there's a caused-by part of the exception that you've deleted? Or a few lines that you've removed?
About the show_sql thing: check your .cfg.xml files and configuration source code for places where you're setting hibernate.show_sql to true. You don't need to set it to false, that's the default. If you set it to false then later set it to true, the true value is used.
Also, if you do set it to false, you could try the correct syntax:
Code:
<property name="hibernate.show_sql">false</property>