Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-43877

Hard delete stacktraces to cleanup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 20.0, 21.0 [Tentative]
    • Fix Version/s: 21.0 [Tentative]
    • Component/s: Gradebook, Kernel
    • Labels:
      None
    • 20 status:
      Please Merge
    • 19 status:
      Please Merge
    • Test Plan:
      Hide

      1. Create a site with Gradebook and Resources as instructor
      2. Add one gb item, one category, score 3 students, add comments to one of the grades
      3. Login as admin and Hard Delete site via Worksite Setup
      4. Review logs. Should be no stacktraces. Warnings are fine

      Show
      1. Create a site with Gradebook and Resources as instructor 2. Add one gb item, one category, score 3 students, add comments to one of the grades 3. Login as admin and Hard Delete site via Worksite Setup 4. Review logs. Should be no stacktraces. Warnings are fine

      Description

      Hard delete is responsible for removing all gb objects, categories, comments, etc from database.

      Sample stacktraces:

      EIGN KEY (`GRADABLE_OBJECT_ID`) REFERENCES `gb_gradable_object_t` (`ID`))                                                                                                                                                                                [36/1948]
      01-Jul-2020 14:23:22.175 ERROR [QuartzScheduler_Worker-3] org.sakaiproject.site.impl.BaseSiteService.disableRelated Error encountered while notifying ContextObserver of Site Change
      org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
              at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:163)
              at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:344)
              at org.springframework.orm.hibernate4.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309)
              at org.springframework.orm.hibernate4.HibernateTemplate.flush(HibernateTemplate.java:838)
              at org.sakaiproject.component.gradebook.GradebookFrameworkServiceImpl.deleteGradebook(GradebookFrameworkServiceImpl.java:385)
              at sun.reflect.GeneratedMethodAccessor866.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
              at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:283)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
              at com.sun.proxy.$Proxy150.deleteGradebook(Unknown Source)
              at org.sakaiproject.gradebookng.framework.GradebookNgContextObserver.contextDeleted(GradebookNgContextObserver.java:62)
              at org.sakaiproject.site.impl.BaseSiteService.disableRelated(BaseSiteService.java:2720)
              at org.sakaiproject.site.impl.BaseSiteService.removeSite(BaseSiteService.java:1489)
              at org.sakaiproject.component.app.scheduler.jobs.SoftSiteDeletionJob.execute(SoftSiteDeletionJob.java:119)
              at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:57)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
      Caused by: 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.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3403)
              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:465)
              at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)
              at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
              at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
              at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)
              at org.springframework.orm.hibernate4.HibernateTemplate$27.doInHibernate(HibernateTemplate.java:841)
              at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:341)
              ... 22 more
      
      01-Jul-2020 14:16:31.991 INFO [http-nio-9080-exec-10] org.sakaiproject.content.impl.BaseContentService.hardDelete hardDelete proceeding on collectionId: /group/c9ffcb7c-27de-4af0-9579-ae62d85d0c08/
      01-Jul-2020 14:16:31.992 WARN [http-nio-9080-exec-10] org.sakaiproject.content.impl.BaseContentService.getAllDeletedResources getAllDeletedResources: cannot retrieve collection for : /group/c9ffcb7c-27de-4af0-9579-ae62d85d0c08/
      01-Jul-2020 14:16:31.998 WARN [http-nio-9080-exec-10] org.sakaiproject.content.impl.BaseContentService.hardDelete Failed to remove collection /group/c9ffcb7c-27de-4af0-9579-ae62d85d0c08/.
      org.sakaiproject.exception.IdUnusedException id: /group/c9ffcb7c-27de-4af0-9579-ae62d85d0c08/
              at org.sakaiproject.content.impl.BaseContentService.removeCollection(BaseContentService.java:2852)
              at org.sakaiproject.content.impl.BaseContentService.hardDelete(BaseContentService.java:14488)
              at org.sakaiproject.site.impl.BaseSiteService.hardDelete(BaseSiteService.java:2759)
              at org.sakaiproject.site.impl.BaseSiteService.removeSite(BaseSiteService.java:1493)
              at org.sakaiproject.site.cover.SiteService.removeSite(SiteService.java:298)
              at org.sakaiproject.site.tool.SiteAction.doSite_delete_confirmed(SiteAction.java:5560)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.sakaiproject.cheftool.VelocityPortletPaneledAction.actionDispatch(VelocityPortletPaneledAction.java:767)
              at org.sakaiproject.cheftool.VelocityPortletPaneledAction.processAction(VelocityPortletPaneledAction.java:576)
              at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:228)
              at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1188)
              at org.sakaiproject.cheftool.ToolServlet.doPost(ToolServlet.java:152)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
              at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
              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.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:426)
              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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:352)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
              at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:508)
              at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1500)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.doToolBuffer(SiteHandler.java:1253)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.bufferContent(SiteHandler.java:1087)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.doSite(SiteHandler.java:499)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:275)
              at org.sakaiproject.portal.charon.handlers.SiteHandler.doGet(SiteHandler.java:163)
              at org.sakaiproject.portal.charon.handlers.WorksiteHandler.doPost(WorksiteHandler.java:69)
              at org.sakaiproject.portal.charon.SkinnableCharonPortal.doPost(SkinnableCharonPortal.java:1173)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
              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)
      

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                ottenhoff Sam Ottenhoff
                Reporter:
                ottenhoff Sam Ottenhoff
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration