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

RS: cannot delete lecture block in course with notice

    XMLWordPrintable

    Details

      Description

      2019-11-29 14:14:10.735 [ajp-nio2-8092-exec-29] ERROR OLATRuntimeException
      I264464-J33783 org.olat.core.logging.OLATRuntimeException ^%^ 11042816
      https://xyz.openolat.com/auth/RepositoryEntry/10092545/LecturesAdmin/0/LectureBlocks/0
      Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36
      **RedScreen** org.hibernate.exception.ConstraintViolationException: could not execute statement
      
      <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.modules.lecture.ui.LectureListRepositoryController</controllername>
      	<controllername>org.olat.modules.lecture.ui.LectureRepositoryAdminController</controllername>
      	<controllername>org.olat.course.run.CourseRuntimeController</controllername>
      	<controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername>
      	</controllerinfo>
      </dispatchinfo>
      
      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
       at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
       at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1534)
       at org.hibernate.query.Query.getResultList(Query.java:165) at org.olat.modules.lecture.manager.LectureBlockDAO.getLectureBlocks(LectureBlockDAO.java:186)
       at org.olat.modules.lecture.manager.LectureBlockDAO.getLecturesBlockWithTeachers(LectureBlockDAO.java:473)
       at org.olat.modules.lecture.manager.LectureServiceImpl.getLectureBlocksWithTeachers(LectureServiceImpl.java:1394)
       at org.olat.modules.lecture.ui.LectureListRepositoryController.loadModel(LectureListRepositoryController.java:184)
       at org.olat.modules.lecture.ui.LectureListRepositoryController.event(LectureListRepositoryController.java:284)
       at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:250)
       at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
       at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:247)
       at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:194)
       at org.olat.core.gui.control.generic.modal.DialogBoxController.event(DialogBoxController.java:221)
       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.link.Link.dispatch(Link.java:205)
       at org.olat.core.gui.components.link.Link.doDispatchRequest(Link.java:192)
       at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
       at org.olat.core.gui.components.Window.doDispatchToComponent(Window.java:1201)
       at org.olat.core.gui.components.Window.dispatchRequest(Window.java:398) ... 39 more
      Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
       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)
       at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:478)
       at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:361)
       at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:56)
       at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1454)
       at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1540)
       at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1557)
       at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1525) ... 59 more
      Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "o_lecture_block" violates foreign key constraint "notice_to_block_idx" on table "o_lecture_notice_to_block" Detail: Key (id)=(66) is still referenced from table "o_lecture_notice_to_block".
       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:87)
       at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:87)
       at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175) ... 71 more
      

        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: