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

RS: delete a group with tasks

    XMLWordPrintable

    Details

      Description

      It's currently not possible to delete a group in a course which was used in a GTA course element with revisions.

      org.hibernate.engine.jdbc.spi.SqlExceptionHelper
      https://www.openolat.xyz.de/auth/GroupsSite/0/Search/0
      Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0
      ERROR: update or delete on table "o_gta_task" violates foreign key constraint "gtaskrev_to_task_idx" on table "o_gta_task_revision_date" Detail: Key (id)=(89620733) is still referenced from table "o_gta_task_revision_date". Detail: Key (id)=(89620733) is still referenced from table "o_gta_task_revision_date"
      javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
       at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
       at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
       at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1621)
       at org.olat.course.nodes.gta.manager.GTAUserDataManager.deleteGroupDataFor(GTAUserDataManager.java:72)
       at org.olat.group.manager.BusinessGroupServiceImpl.deleteBusinessGroup(BusinessGroupServiceImpl.java:749)
       at org.olat.group.ui.main.AbstractBusinessGroupListController.doDelete(AbstractBusinessGroupListController.java:1117)
       at org.olat.group.ui.main.AbstractBusinessGroupListController.event(AbstractBusinessGroupListController.java:435)
       at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:258)
       at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
       at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:255)
       at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:202)
       at org.olat.group.ui.main.BusinessGroupDeleteDialogBoxController.formOK(BusinessGroupDeleteDialogBoxController.java:97)
       at org.olat.core.gui.components.form.flexible.impl.FormBasicController.event(FormBasicController.java:389)
       at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:214)
       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.fireValidation(FormWrapperContainer.java:124)
       at org.olat.core.gui.components.form.flexible.impl.Form.submit(Form.java:461)
       at org.olat.core.gui.components.form.flexible.impl.Form.submit(Form.java:448)
       at org.olat.core.gui.components.form.flexible.impl.elements.FormSubmit.dispatchFormRequest(FormSubmit.java:77)
       at org.olat.core.gui.components.form.flexible.impl.FormItemImpl.doDispatchFormRequest(FormItemImpl.java:568)
       at org.olat.core.gui.components.form.flexible.impl.Form.evalFormRequest(Form.java:316)
       at org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer.doDispatchRequest(FormWrapperContainer.java:105)
       at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
       at org.olat.core.gui.components.Window.doDispatchToComponent(Window.java:1249)
       at org.olat.core.gui.components.Window.dispatchRequest(Window.java:429)
       at org.olat.core.gui.components.Window.doDispatchRequest(Window.java:310)
       at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
       at org.olat.dispatcher.AuthenticatedDispatcher.processValidDispatchURI(AuthenticatedDispatcher.java:275)
       at org.olat.dispatcher.AuthenticatedDispatcher.execute(AuthenticatedDispatcher.java:194)
       at org.olat.core.servlets.OpenOLATServlet.executeUserRequest(OpenOLATServlet.java:269)
       at org.olat.core.servlets.OpenOLATServlet.doPost(OpenOLATServlet.java:216)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
       at org.olat.core.servlets.OpenOLATServlet.service(OpenOLATServlet.java:160)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
       at org.olat.core.servlets.HeadersFilter.doFilter(HeadersFilter.java:97)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
       at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:476)
       at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
       at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
       at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1777)
       at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
       at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1082)
       at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:569)
       at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:547)
       at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
       at sun.nio.ch.Invoker$2.run(Invoker.java:218)
       at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.lang.Thread.run(Thread.java:748) 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:200)
       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:146)
       at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:458)
       at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:377)
       at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1436)
       at org.hibernate.query.internal.AbstractProducedQuery.doExecuteUpdate(AbstractProducedQuery.java:1630)
       at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1612)
       ... 64 more Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "o_gta_task" violates foreign key constraint "gtaskrev_to_task_idx" on table "o_gta_task_revision_date" Detail: Key (id)=(89620733) is still referenced from table "o_gta_task_revision_date".
       at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532)
       at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267)
       at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312)
       at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448)
       at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369)
       at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:153)
       at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:119)
       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:197) 
      ... 72 more2020-10-29 09:28:21.418 [ajp-nio2-8009-exec-580] ERROR OLATRuntimeException ^%^ I11130790-J2833665 ^%^ org.olat.core.logging.OLATRuntimeException ^%^ 2785307 ^%^ 134.100.40.26 ^%^ 
      

        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: