Meaningless Drivel is fun!
The moose likes Object Relational Mapping and the fly likes optimistic lock error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "optimistic lock error" Watch "optimistic lock error" New topic

optimistic lock error

Olga Bayok

Joined: Jan 08, 2013
Posts: 1
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?

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: optimistic lock error
It's not a secret anymore!