[Building Sakai] Stack Trace: org.hibernate.StaleObjectStateException
Paul Lukasewych
plukasew at uwo.ca
Fri Mar 27 06:29:08 PDT 2015
I've seen this a lot here as well and did some investigation. I came to
the conclusion that this is probably being caused by users
double-clicking on links.
The root of the problem is that every page item load writes a timestamp
to the database recording that last access time for that item by the
current user. If two item updates are fired in quick succession for the
same item for the same user, we get this stack trace because the second
database update fails.
I did look into dealing with the exception, but from what I could tell,
it doesn't bubble up into the the Lessons code.
Paul Lukasewych
Applications Development Team
Information Technology Services
Support Services Building
Western University
(519) 661-2111 x80513
plukasew at uwo.ca
On 2015-03-27 08:54 AM, Miller, Jeffrey wrote:
> Greetings,
>
> I'm noticing more and more the following stack trace on production 2.9:
>
> 388 2015-03-27 05:01:14,406 ERROR
> org.hibernate.event.def.AbstractFlushingEventListener - Could not
> synchronize database state with session
>
> 389 org.hibernate.StaleObjectStateException: Row was updated or deleted by
> another transaction (or unsaved-value mapping was incorrect):
> [org.sakaiproject.lessonbuildertool.SimplePageLog
>
> EntryImpl#299295]
>
> 390 at
> org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1759)
>
> 391 at
> org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2402)
>
> 392 at
> org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2302)
>
> 393 at
> org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2602)
>
> 394 at
> org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
>
> 395 at
> org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
>
> 396 at
> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
>
> 397 at
> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
>
> 398 at
> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
>
> 399 at
> org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
>
> 400 at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001)
>
> 401 at
> org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339)
>
> 402 at
> org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
>
> 403 at
> org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
>
> 404 at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
>
> 405 at
> org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
>
> 406 at
> org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
>
> 407 at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
>
> 408 at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>
> 409 at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>
> 410 at com.sun.proxy.$Proxy72.update(Unknown Source)
>
>
>
> 411 at
> org.sakaiproject.lessonbuildertool.tool.beans.SimplePageBean.update(SimplePageBean.java:669)
>
> ...
>
> Has anyone else experienced this type of error?
>
> Regards,
> -jeb
>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
More information about the sakai-dev
mailing list