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

Cannot delete a user

    XMLWordPrintable

    Details

      Description

      Hibernate error trying to delete a user with the "direct delete"

      2016-12-12 11:58:50,812 [ajp-nio2-8003-exec-8] ERROR DBRuntimeException - OLAT::ERROR ^%^ N3-E9 ^%^ org.olat.core.logging 
      
      https://xyz.olat.com/auth/UserAdminSite/0/userdelete_direct/0 ^%^ Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
      
      **RedScreen** commit failed, rollback transaction
      
      <dispatchinfo>
      	<componentinfo>
      		<compname>link_0</compname>
      		<compclass>org.olat.core.gui.components.link.Link</compclass>
      		<extendedinfo>n/a</extendedinfo>
      		<event>
      			<class&gt;org.olat.core.gui.control.Event</class&gt;
      			<command>link_0</command>
      			<tostring>com:link_0,org.olat.core.gui.control.Event@be46a54a</tostring>
      		</event>
      	</componentinfo>
      	<controllerinfo>
      		<controllername>org.olat.core.gui.control.generic.modal.DialogBoxController</controllername>
      		<controllername>org.olat.admin.user.delete.DirectDeleteController</controllername>
      		<controllername>org.olat.admin.UserAdminMainController</controllername>
      		<controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername>
      	</controllerinfo>
      </dispatchinfo>
      
      >>> stack of 1.cause::org.olat.core.logging.DBRuntimeException: commit failed, rollback transaction
      -> at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:755)
         at org.olat.admin.user.delete.service.UserDeletionManager.deleteIdentity(UserDeletionManager.java:329)
         at org.olat.admin.user.delete.DirectDeleteController.deleteIdentities(DirectDeleteController.java:176)
         at org.olat.admin.user.delete.DirectDeleteController.event(DirectDeleteController.java:124)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:246)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
         at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:243)
         at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:190)
         at org.olat.core.gui.control.generic.modal.DialogBoxController.event(DialogBoxController.java:205)
         at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:202)
         at org.olat.core.gui.components.AbstractComponent$1.run(AbstractComponent.java:240)
      >>> stack of 2.cause::javax.persistence.RollbackException: Error while committing the transaction
      -> at org.hibernate.internal.ExceptionConverterImpl.convertCommitException(ExceptionConverterImpl.java:75)
         at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:71)
         at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:712)
         at org.olat.admin.user.delete.service.UserDeletionManager.deleteIdentity(UserDeletionManager.java:329)
         at org.olat.admin.user.delete.DirectDeleteController.deleteIdentities(DirectDeleteController.java:176)
         at org.olat.admin.user.delete.DirectDeleteController.event(DirectDeleteController.java:124)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:246)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
         at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:243)
         at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:190)
         at org.olat.core.gui.control.generic.modal.DialogBoxController.event(DialogBoxController.java:205)
      >>> stack of 3.cause::javax.persistence.OptimisticLockException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
      -> at org.hibernate.internal.ExceptionConverterImpl.wrapStaleStateException(ExceptionConverterImpl.java:212)
         at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:86)
         at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)
         at org.hibernate.internal.ExceptionConverterImpl.convertCommitException(ExceptionConverterImpl.java:56)
         at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:71)
         at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:712)
         at org.olat.admin.user.delete.service.UserDeletionManager.deleteIdentity(UserDeletionManager.java:329)
         at org.olat.admin.user.delete.DirectDeleteController.deleteIdentities(DirectDeleteController.java:176)
         at org.olat.admin.user.delete.DirectDeleteController.event(DirectDeleteController.java:124)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:246)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      >>> stack of 4.cause::org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
      -> at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
         at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
         at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)
         at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3246)
         at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3483)
         at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:99)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:582)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:456)
         at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
         at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
         at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1397)
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            srosse Stéphane Rossé
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: