Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-929

RS if update of the user course infos fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.1.2
    • Fix Version/s: 9.2.1
    • Component/s: Course, Database
    • Labels:
      None

      Description

      A StaleObjectException appear from time to time. The solution is to adopt a more defensive querying and remove the version on the UserCourseInfos object.

      2014-01-02 13:17:54,929 [ajp-apr-8026-exec-4] INFO  UserSessionManager  - OLAT::AUDIT ^%^ N26-A51114 ^%^ org.olat.core.util.session ^%^ username11 ^%^ xxx.yyy.zzz.aaa ^%^ http://www.domain.ch/AFF.244.0.html
      Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 ^%^ n/a ^%^ Logged on: login: [username11] first: [] last: [] fromIP: [xxx.yyy.zzz.aaa] fromFQN: [xxx.yyy.zzz.aaa.cust.bluewin.ch] authProvider: [OLAT] webdav: [false] REST: [false] secure: [true] webMode: [null] duration: [0]s
      2014-01-02 13:17:55,127 [ajp-apr-8026-exec-4] INFO  RunMainController  - OLAT::AUDIT ^%^ N26-A51115 ^%^ org.olat.course.run ^%^ username11 ^%^ xxx.yyy.zzz.aaa
      http://www.domain.ch/AFF.244.0.html ^%^ Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 ^%^ 84296108961924 ^%^ Entering course: [[[Info]]]
      2014-01-02 13:18:13,049 [ajp-apr-8026-exec-8] INFO  RunMainController  - OLAT::AUDIT ^%^ N26-A51116 ^%^ org.olat.course.run ^%^ username11 ^%^ xxx.yyy.zzz.aaa
      https://domain.olat.com/domain/m/5af24614f9c4f9912a888edb188d628e/klassenseiten.html ^%^ Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 ^%^ 85914019389135 ^%^ Entering course: [[[Klassenseite FaBe b 2011 - 2014]]]
      2014-01-02 13:18:13,099 [ajp-apr-8026-exec-9] INFO  RunMainController  - OLAT::AUDIT ^%^ N26-A51117 ^%^ org.olat.course.run ^%^ username11 ^%^ xxx.yyy.zzz.aaa
      https://domain.olat.com/domain/m/5af24614f9c4f9912a888edb188d628e/klassenseiten.html ^%^ Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 ^%^ 85914019389135 ^%^ Entering course: [[[Klassenseite FaBe b 2011 - 2014]]]
      2014-01-02 13:18:13,187 [ajp-apr-8026-exec-9] WARN  DBImpl  - OLAT::WARN ^%^ N26-W20209 ^%^ org.olat.core.commons.persistence ^%^ username11 ^%^ xxx.yyy.zzz.aaa
      https://domain.olat.com/domain/m/5af24614f9c4f9912a888edb188d628e/klassenseiten.html ^%^ Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 ^%^ Caught Exception in DBImpl.commit.
      >>>stack of 1.cause::javax.persistence.RollbackException: Error while committing the transaction
      -> at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:92)
         at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:761)
         at org.olat.commons.coordinate.cluster.ClusterSyncer.doInSync(ClusterSyncer.java:116)
         at org.olat.commons.coordinate.cluster.ClusterSyncer.doInSync(ClusterSyncer.java:133)
         at org.olat.course.assessment.manager.UserCourseInformationsManagerImpl.updateUserCourseInformations(UserCourseInformationsManagerImpl.java:122)
         at org.olat.course.run.RunMainController.setLaunchDates(RunMainController.java:352)
         at org.olat.course.run.RunMainController.<init>(RunMainController.java:262)
         at org.olat.course.CourseFactory.createLaunchController(CourseFactory.java:193)
         at org.olat.repository.handlers.CourseHandler.createLaunchController(CourseHandler.java:145)
         at org.olat.repository.RepositoyUIFactory.createLaunchController(RepositoyUIFactory.java:88)
         at org.olat.course.site.CourseSiteContextEntryControllerCreator.createController(CourseSiteContextEntryControllerCreator.java:64)
      >>>stack of 2.cause::javax.persistence.OptimisticLockException: null
      ->  at org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException(AbstractEntityManagerImpl.java:1413)
          at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1329)
          at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
          at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:80)
          at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:761)
          at org.olat.commons.coordinate.cluster.ClusterSyncer.doInSync(ClusterSyncer.java:116)
          at org.olat.commons.coordinate.cluster.ClusterSyncer.doInSync(ClusterSyncer.java:133)
          at org.olat.course.assessment.manager.UserCourseInformationsManagerImpl.updateUserCourseInformations(UserCourseInformationsManagerImpl.java:122)
          at org.olat.course.run.RunMainController.setLaunchDates(RunMainController.java:352)
          at org.olat.course.run.RunMainController.<init>(RunMainController.java:262)
          at org.olat.course.CourseFactory.createLaunchController(CourseFactory.java:193)
      >>>stack of 3.cause::org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.olat.course.assessment.model.UserCourseInfosImpl#31752640]
      -> at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2509)
         at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3228)
         at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3126)
         at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3456)
         at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140)
         at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:369)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:287)
         at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339)
         at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
         at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1234)
      
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              srosse Stéphane Rossé
              Tester:
              Florian Gnägi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h