[samigo-team] Hibernate update exception
David Horwitz
david.horwitz at uct.ac.za
Wed Apr 17 07:24:54 PDT 2013
Hi All,
I'm busy testing the SAM-2080<https://jira.sakaiproject.org/browse/SAM-2080> changes in production.
This has caused an error that was previously logged and swallowed to escalalte to the portal error handler. I can fix the escalation but would like to understand the root cause of the bug report and see if it can be resolved or is harmeless. This is on our 2.9 based msub.
The error is:
caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1
(Full stack at the end of the message). The origin is AssessmentGradingFacadeQueries.saveOrUpdateAll(Collection). Googling suggests either - and update to an deleted item or a null in the collection. The later I havent reproduced in a a test while the later produces a different error. I have seen this in the logs before but am suprised by how often its seen.
Any Ideas?
David
aused by: org.sakaiproject.tool.api.ToolException: javax.servlet.ServletException: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1
at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1470)
caused by: javax.servlet.ServletException: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
caused by: java.lang.RuntimeException: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1
at org.sakaiproject.tool.assessment.services.GradingService.storeGrades(GradingService.java:717)
caused by: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1
at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:789)
caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [7]; actual row count: 0; expected: 1
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:247)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy105.saveOrUpdateAll(null:-1)
at org.sakaiproject.tool.assessment.services.GradingService.saveOrUpdateAll(GradingService.java:1796)
at org.sakaiproject.tool.assessment.services.GradingService.storeGrades(GradingService.java:939)
at org.sakaiproject.tool.assessment.services.GradingService.storeGrades(GradingService.java:717)
at org.sakaiproject.tool.assessment.ui.listener.delivery.SubmitToGradingActionListener.persistAssessmentGrading(SubmitToGradingActionListener.java:449)
at org.sakaiproject.tool.assessment.ui.listener.delivery.SubmitToGradingActionListener.submitToGradingService(SubmitToGradingActionListener.java:275)
at org.sakaiproject.tool.assessment.ui.listener.delivery.SubmitToGradingActionListener.processAction(SubmitToGradingActionListener.java:115)
at org.sakaiproject.tool.assessment.ui.listener.delivery.TableOfContentsActionListener.processAction(TableOfContentsActionListener.java:82)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
________________________________
UNIVERSITY OF CAPE TOWN
This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/samigo-team/attachments/20130417/b5db77bd/attachment.html
More information about the samigo-team
mailing list