Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2508

Unpredictable hibernate batch update exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.3.3
    • Fix Version/s: 2.3.5
    • Component/s: None
    • Labels:
      None

      Description

      This is an issue that occurs occasionally but the origin is difficult to pinpoint

      Most recently reported by Chen Rui and ntu when calling the getToolOutputs service. Basically the exception looks a little like this - despite the fact that no update is being made.

      ERROR org.lamsfoundation.lams.webservice.xml.LessonManagerServlet - Problem creating tool output report for lesson: 3006
      org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
      org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
      at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:92)
      at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:78)
      at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:172)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
      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:716)
      at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:884)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:661)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:486)
      at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:267)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
      at $Proxy43.getOutputDefinitionsFromTool(Unknown Source)
      at org.lamsfoundation.lams.webservice.xml.LessonManagerServlet.getActivityOutputsElement(LessonManagerServlet.java:921)
      at org.lamsfoundation.lams.webservice.xml.LessonManagerServlet.getLearnerOutputsElement(LessonManagerServlet.java:878)
      at org.lamsfoundation.lams.webservice.xml.LessonManagerServlet.getToolOutputs(LessonManagerServlet.java:745)
      1. lams.log
        4.21 MB
        Luke Foxton

        Activity

        Hide
        jundirl Jun-Dir Liew added a comment -
        Another one, this time thrown from AuthoringService

         ERROR org.lamsfoundation.lams.authoring.web.AuthoringAction - Exception thrown getToolOutputDefinitions
        org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
        org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
                at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:92)
                at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:78)
                at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
                at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:172)
                at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
                at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
                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:716)
                at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:884)
                at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:661)
                at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:486)
                at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473)
                at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:267)
                at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
                at $Proxy43.getOutputDefinitionsFromTool(Unknown Source)
                at org.lamsfoundation.lams.authoring.service.AuthoringService.getToolOutputDefinitions(AuthoringService.java:395)

        Show
        jundirl Jun-Dir Liew added a comment - Another one, this time thrown from AuthoringService  ERROR org.lamsfoundation.lams.authoring.web.AuthoringAction - Exception thrown getToolOutputDefinitions org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1 org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1         at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:92)         at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:78)         at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)         at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:172)         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)         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:716)         at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:884)         at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:661)         at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:486)         at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473)         at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:267)         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)         at $Proxy43.getOutputDefinitionsFromTool(Unknown Source)         at org.lamsfoundation.lams.authoring.service.AuthoringService.getToolOutputDefinitions(AuthoringService.java:395)
        Hide
        jundirl Jun-Dir Liew added a comment -
        Previous exception was from 2.3.1
        Show
        jundirl Jun-Dir Liew added a comment - Previous exception was from 2.3.1
        Hide
        dronych Andrey Balan added a comment -
        this is definitely duplicate to LDEV-2605
        Show
        dronych Andrey Balan added a comment - this is definitely duplicate to LDEV-2605

          People

          • Assignee:
            dronych Andrey Balan
            Reporter:
            lfoxton Luke Foxton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development