Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

optimistic lock error

Olga Bayok
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all
In my application login failes when I hit enter key and click button 'Login' immediately afterwards with this error
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [UserVO] with identifier [42]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [UserVO#42]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(
at org.springframework.orm.hibernate3.SpringSessionSynchronization.translateException(
at org.springframework.orm.hibernate3.SpringSessionSynchronization.beforeCommit(
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(
at $Proxy173.login(Unknown Source)

I have read some information about this error, but in my case i don't know how i can fix this. Can you help me and show some example?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic