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

RS: revision of task are not deleted with the GTA course element

    XMLWordPrintable

    Details

      Description

      If an author try to delete a task course element with some revisions, it get a red screen.

      2020-03-21 08:37:04.130 [ajp-nio2-8075-exec-59] ERROR OLATRuntimeException ^%^ I265193-J76418 ^%^ org.olat.core.logging.OLATRuntimeException
      https://xyz.openolat.com/auth/RepositoryEntry/69009411/Editor/0 ^%^ Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
      
      **RedScreen** org.hibernate.exception.GenericJDBCException: could not extract ResultSet
      <dispatchinfo>
      	<componentinfo>
      		<compname>pbl.quick.auto</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>pbl.quick.auto</command>
      			<tostring>com:pbl.quick.auto,org.olat.core.gui.control.Event@809d32e3</tostring>
      		</event>
      	</componentinfo>
      	<controllerinfo>
      		<controllername>org.olat.course.editor.QuickPublishController</controllername>
      		<controllername>org.olat.course.editor.EditorMainController</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.GenericJDBCException: could not extract ResultSet
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
      at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1535)
      at org.hibernate.query.Query.getResultList(Query.java:165)
      at org.olat.repository.RepositoryManager.lookupRepositoryEntryKey(RepositoryManager.java:378)
      at org.olat.course.nodes.st.STCourseNodeEditController.<init>(STCourseNodeEditController.java:145)
      at org.olat.course.nodes.STCourseNode.createEditController(STCourseNode.java:140)
      at org.olat.course.editor.EditorMainController.initNodeEditor(EditorMainController.java:525)
      at org.olat.course.editor.EditorMainController.updateViewForSelectedNodeId(EditorMainController.java:504)
      at org.olat.course.editor.EditorMainController.updateAfterPublishing(EditorMainController.java:753)
      at org.olat.course.editor.EditorMainController.event(EditorMainController.java:629)
      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.course.editor.QuickPublishController.event(QuickPublishController.java:130)
      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:207)
      at org.olat.core.gui.components.link.Link.doDispatchRequest(Link.java:194)
      at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
      at org.olat.core.gui.components.Window.doDispatchToComponent(Window.java:1218)
      at org.olat.core.gui.components.Window.dispatchRequest(Window.java:400) ... 39 more Caused by: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
      at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
      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.extract(ResultSetReturnImpl.java:67)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:2292)
      at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2050)
      at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2012)
      at org.hibernate.loader.Loader.doQuery(Loader.java:953)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)
      at org.hibernate.loader.Loader.doList(Loader.java:2815)
      at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2659)
      at org.hibernate.loader.Loader.list(Loader.java:2621)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:506)
      at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:396)
      at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:219)
      at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1396)
      at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1558)
      at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1526) ... 61 more Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction 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.executeQuery(PgPreparedStatement.java:113)
      at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:73)
      at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:73)
      at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57) ... 75 more Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "o_gta_task" violates foreign key constraint "task_rev_to_task_idx" on table "o_gta_task_revision" Detail: Key (id)=(68124689) is still referenced from table "o_gta_task_revision".
      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:197)
      at org.hibernate.hql.internal.ast.exec.BasicExecutor.doExecute(BasicExecutor.java:100)
      at org.hibernate.hql.internal.ast.exec.BasicExecutor.execute(BasicExecutor.java:59)
      at org.hibernate.hql.internal.ast.exec.DeleteExecutor.execute(DeleteExecutor.java:113)
      at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:454)
      at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:377)
      at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1420)
      at org.hibernate.query.internal.AbstractProducedQuery.doExecuteUpdate(AbstractProducedQuery.java:1623)
      at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1605)
      at org.olat.course.nodes.gta.manager.GTAManagerImpl.deleteTaskList(GTAManagerImpl.java:804)
      at org.olat.course.nodes.GTACourseNode.cleanupOnDelete(GTACourseNode.java:745)
      at org.olat.course.editor.PublishProcess.applyPublishSet(PublishProcess.java:444)
      at org.olat.course.editor.QuickPublishController.doAutoPublish(QuickPublishController.java:176)
      at org.olat.course.editor.QuickPublishController.event(QuickPublishController.java:129)
      ... 48 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: