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

RS: cannot delete a curriculum with element linked to a lecture block

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14.1
    • Component/s: Curriculum
    • Labels:
      None

      Description

      Cannot delete a curriculum where a curriculum element is used for lectures.

      <dispatchinfo>
      	<componentinfo>
      		<compname>ffo_main_confirm_delete_curriculum</compname>
      		<compclass>org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer</compclass>
      		<extendedinfo>n/a</extendedinfo>
      		<event>
      			<class&gt;org.olat.core.gui.components.form.flexible.impl.FormEvent</class&gt;
      			<command>done</command>
      			<tostring>com:done,org.olat.core.gui.components.form.flexible.impl.FormEvent@2f23a1</tostring>
      		</event>
      	</componentinfo>
      	<controllerinfo>
      		<controllername>org.olat.modules.curriculum.ui.ConfirmCurriculumDeleteController</controllername>
      		<controllername>org.olat.modules.curriculum.ui.CurriculumListManagerController</controllername>
      		<controllername>org.olat.modules.curriculum.ui.CurriculumManagerController</controllername>
      		<controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername>
      	</controllerinfo>
      </dispatchinfo> 
      Throwable: org.olat.core.logging.DBRuntimeException
      
      logmsg:commit failed, rollback transaction
      message:commit failed, rollback transaction,org.olat.core.logging.DBRuntimeException
      
      at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:573)
      at org.olat.modules.curriculum.manager.CurriculumServiceImpl.deleteCurriculum(CurriculumServiceImpl.java:154)
      at org.olat.modules.curriculum.ui.ConfirmCurriculumDeleteController.formInnerEvent(ConfirmCurriculumDeleteController.java:121)
      at org.olat.core.gui.components.form.flexible.impl.FormBasicController.event(FormBasicController.java:430)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:206)
      at org.olat.core.gui.components.AbstractComponent$1.run(AbstractComponent.java:240)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.components.AbstractComponent.fireEvent(AbstractComponent.java:238)
      at org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer.fireFormEvent(FormWrapperContainer.java:131)
      at org.olat.core.gui.components.form.flexible.impl.Form.fireFormEvent(Form.java:717)
      
      1. cause:
      
      message:Error while committing the transaction,javax.persistence.RollbackException
      
      at org.hibernate.internal.ExceptionConverterImpl.convertCommitException(ExceptionConverterImpl.java:81)
      at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:107)
      at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:530)
      at org.olat.modules.curriculum.manager.CurriculumServiceImpl.deleteCurriculum(CurriculumServiceImpl.java:154)
      at org.olat.modules.curriculum.ui.ConfirmCurriculumDeleteController.formInnerEvent(ConfirmCurriculumDeleteController.java:121)
      at org.olat.core.gui.components.form.flexible.impl.FormBasicController.event(FormBasicController.java:430)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:206)
      at org.olat.core.gui.components.AbstractComponent$1.run(AbstractComponent.java:240)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.components.AbstractComponent.fireEvent(AbstractComponent.java:238)
      
      2. cause:
      
      message:org.hibernate.exception.ConstraintViolationException: could not execute statement,javax.persistence.PersistenceException
      
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
      at org.hibernate.internal.ExceptionConverterImpl.convertCommitException(ExceptionConverterImpl.java:65)
      at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:107)
      at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:530)
      at org.olat.modules.curriculum.manager.CurriculumServiceImpl.deleteCurriculum(CurriculumServiceImpl.java:154)
      at org.olat.modules.curriculum.ui.ConfirmCurriculumDeleteController.formInnerEvent(ConfirmCurriculumDeleteController.java:121)
      at org.olat.core.gui.components.form.flexible.impl.FormBasicController.event(FormBasicController.java:430)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:206)
      at org.olat.core.gui.components.AbstractComponent$1.run(AbstractComponent.java:240)
      
      3. cause:
      
      message:could not execute statement,org.hibernate.exception.ConstraintViolationException
      
      at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:109)
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
      at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
      at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:178)
      at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
      at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3519)
      at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3778)
      at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:100)
      at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
      
      4. cause:
      
      message:ERROR: update or delete on table "o_bs_group" violates foreign key constraint "lec_block_to_block_idx" on table "o_lecture_block_to_group" Detail: Key (id)=(1847623681) is still referenced from table "o_lecture_block_to_group".,org.postgresql.util.PSQLException
      
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
      at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
      at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:150)
      at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:127)
      at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:121)
      at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:121)
      at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            srosse Stéphane Rossé
            Tester:
            Mandy Menzel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 minutes
                5m