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

Can't remove a lot of users from an organisation at the same time

    Details

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

      Description

      When trying to remove say 60+ users from an org, results in exception in log:

      2009-11-26 08:31:41,377 [TP-Processor421:] FATAL org.lamsfoundation.lams.web.util.CustomStrutsExceptionHandler - org.springframework.orm.hibernate3.HibernateObjectRetrievalFailureException: deleted object would be re-saved by cascade (remove deleted object from associations): [org.lamsfoundation.lams.usermanagement.UserOrganisation#14874]; nested exception is org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [org.lamsfoundation.lams.usermanagement.UserOrganisation#14874]
      org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [org.lamsfoundation.lams.usermanagement.UserOrganisation#14874]
              at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:728)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:166)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:96)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:69)
              at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:454)
              at org.hibernate.engine.Cascades$5.cascade(Cascades.java:153)
              at org.hibernate.engine.Cascades.cascade(Cascades.java:721)
              at org.hibernate.engine.Cascades.cascadeCollection(Cascades.java:860)
              at org.hibernate.engine.Cascades.cascade(Cascades.java:739)
              at org.hibernate.engine.Cascades.cascade(Cascades.java:817)
              at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:121)
              at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:112)
              at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:59)
              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
              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.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:623)
              at org.lamsfoundation.lams.usermanagement.service.UserManagementService$$EnhancerByCGLIB$$74a0082.findById(<generated>)
              at org.lamsfoundation.lams.admin.web.UserOrgSaveAction.execute(UserOrgSaveAction.java:108)

      Removing users say 10 at a time worked.

        Activity

        Hide
        ernieg Ernie Ghiglione added a comment -
        OK. Thanks Jun!
        Show
        ernieg Ernie Ghiglione added a comment - OK. Thanks Jun!
        Hide
        jundirl Jun-Dir Liew added a comment -
        Can't reproduce, however stack trace shows session being flushed when findById call made. Therefore don't remove/mark for removal any child objects (i.e. UserOrganisations) until after any necessary hibernate calls are made.

        If this issue comes up again we'll reopen the jira.
        Show
        jundirl Jun-Dir Liew added a comment - Can't reproduce, however stack trace shows session being flushed when findById call made. Therefore don't remove/mark for removal any child objects (i.e. UserOrganisations) until after any necessary hibernate calls are made. If this issue comes up again we'll reopen the jira.

          People

          • Assignee:
            jundirl Jun-Dir Liew
            Reporter:
            jundirl Jun-Dir Liew
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development