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

Deleting LDAP users fails: DB constraints

    XMLWordPrintable

    Details

      Description

      Stacktrace when deleting users in the DLAP workflow:

      2014-10-06 16:17:48,997 [ajp-apr-8006-exec-7] ERROR DBRuntimeException - OLAT::ERROR ^%^ N6-E2 ^%^ org.olat.core.logging 
      Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko ^%^ **RedScreen** commit failed, rollback transaction ::_::
      <dispatchinfo>
      	<componentinfo>
      		<compname>ffo_main_stepslayout</compname>
      		<compclass>org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer</compclass>	
      		<extendedinfo>n/a</extendedinfo>
      		<event>
      			<class&gt;org.olat.core.gui.control.Event</class&gt;
      			<command>validation finish</command>
      			<tostring>com:validation finish,org.olat.core.gui.control.Event@2f96e239</tostring>
      		</event>
      	</componentinfo>
      	<controllerinfo>
      		<controllername>org.olat.ldap.ui.DeletStep00$DeletStepForm00</controllername>
      		<controllername>org.olat.core.gui.control.generic.wizard.StepsMainRunController</controllername>
      		<controllername>org.olat.ldap.ui.LDAPAdminController</controllername>
      		<controllername>org.olat.admin.SystemAdminMainController</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:768)
         at org.olat.core.commons.services.taskexecutor.manager.TaskExecutorManagerImpl.execute(TaskExecutorManagerImpl.java:106)
         at org.olat.admin.user.delete.service.UserFileDeletionManager.deleteUserData(UserFileDeletionManager.java:64)
         at org.olat.admin.user.delete.service.UserDeletionManager.deleteIdentity(UserDeletionManager.java:298)
         at org.olat.ldap.LDAPLoginManagerImpl.deletIdentities(LDAPLoginManagerImpl.java:456)
         at org.olat.ldap.ui.LDAPAdminController$1.execute(LDAPAdminController.java:203)
         at org.olat.core.gui.control.generic.wizard.StepsMainRunController.finishWizard(StepsMainRunController.java:370)
         at org.olat.core.gui.control.generic.wizard.StepsMainRunController.event(StepsMainRunController.java:353)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:241)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
         at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:238)
      >>> stack of 2.cause::javax.persistence.RollbackException: Error while committing the transaction
      -> at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:94)
         at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:722)
         at org.olat.core.commons.services.taskexecutor.manager.TaskExecutorManagerImpl.execute(TaskExecutorManagerImpl.java:106)
         at org.olat.admin.user.delete.service.UserFileDeletionManager.deleteUserData(UserFileDeletionManager.java:64)
         at org.olat.admin.user.delete.service.UserDeletionManager.deleteIdentity(UserDeletionManager.java:298)
         at org.olat.ldap.LDAPLoginManagerImpl.deletIdentities(LDAPLoginManagerImpl.java:456)
         at org.olat.ldap.ui.LDAPAdminController$1.execute(LDAPAdminController.java:203)
         at org.olat.core.gui.control.generic.wizard.StepsMainRunController.finishWizard(StepsMainRunController.java:370)
         at org.olat.core.gui.control.generic.wizard.StepsMainRunController.event(StepsMainRunController.java:353)
         at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:241)
         at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      >>> stack of 3.cause::javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
         at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
         at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:82)
         at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:722)
         at org.olat.core.commons.services.taskexecutor.manager.TaskExecutorManagerImpl.execute(TaskExecutorManagerImpl.java:106)
         at org.olat.admin.user.delete.service.UserFileDeletionManager.deleteUserData(UserFileDeletionManager.java:64)
         at org.olat.admin.user.delete.service.UserDeletionManager.deleteIdentity(UserDeletionManager.java:298)
         at org.olat.ldap.LDAPLoginManagerImpl.deletIdentities(LDAPLoginManagerImpl.java:456)
         at org.olat.ldap.ui.LDAPAdminController$1.execute(LDAPAdminController.java:203)
         at org.olat.core.gui.control.generic.wizard.StepsMainRunController.finishWizard(StepsMainRunController.java:370)
         at org.olat.core.gui.control.generic.wizard.StepsMainRunController.event(StepsMainRunController.java:353)
      >>> stack of 4.cause::org.hibernate.exception.ConstraintViolationException: could not execute statement
      -> at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:72)
         at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
         at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
         at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
         at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3400)
         at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3630)
         at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:114)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
         at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:349)
      >>> stack of 5.cause::com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`XXXX`.`o_bs_group_member`, CONSTRAINT `member_group_ctx` FOREIGN KEY (`fk_group_id`) REFERENCES `o_bs_group` (`id`))
      -> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
         at com.mysql.jdbc.Util.getInstance(Util.java:386)
         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              gnaegi Florian Gnägi
              Tester:
              Florian Gnägi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 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, 30 minutes
                2h 30m