Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-6117

Unable to delete approval task object from repository after upgrade to 4.0

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0.2
    • 4.1
    • None
    • None
    • live demo

    • Internal

    Description

      After upgrade of demo to 4.0.2 following error occured in logs:

      {code:java}
      2020-03-17 11:14:25,124 [REPOSITORY] [http-nio-8080-exec-4] WARN (com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever): Object task: Approval of: As
      signing role "Patron" to user "michelangelo" (OID:e1cab3b2-222c-4fe0-9e3d-54045a84123b) parsed with 1 warnings
      2020-03-17 11:14:25,148 [MODEL] [http-nio-8080-exec-4] ERROR (com.evolveum.midpoint.gui.api.util.WebModelServiceUtils): Couldn't delete object.
      com.evolveum.midpoint.util.exception.SystemException: Unknown ordinal value [2] for enum class [com.evolveum.midpoint.repo.sql.data.common.enums.RTaskWaitingReason]
              at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralRuntimeException(BaseHelper.java:164)
              at com.evolveum.midpoint.repo.sql.helpers.BaseHelper.handleGeneralException(BaseHelper.java:144)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.deleteObjectAttempt(ObjectUpdater.java:354)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.lambda$deleteObject$11(SqlRepositoryServiceImpl.java:511)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.executeAttempts(SqlRepositoryServiceImpl.java:210)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.executeAttemptsNoSchemaException(SqlRepositoryServiceImpl.java:224)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.deleteObject(SqlRepositoryServiceImpl.java:510)
              at com.evolveum.midpoint.repo.cache.RepositoryCache.deleteObject(RepositoryCache.java:1270)
              at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:473)
              at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:343)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:521)
              at com.sun.proxy.$Proxy239.executeChanges(Unknown Source)
              at com.evolveum.midpoint.gui.api.util.WebModelServiceUtils.deleteObject(WebModelServiceUtils.java:474)
              at com.evolveum.midpoint.gui.api.util.WebModelServiceUtils.deleteObject(WebModelServiceUtils.java:454)
              at com.evolveum.midpoint.web.page.admin.configuration.PageDebugList.deleteSelectedConfirmed(PageDebugList.java:889)
              at com.evolveum.midpoint.web.page.admin.configuration.PageDebugList.access$1900(PageDebugList.java:104)
              at com.evolveum.midpoint.web.page.admin.configuration.PageDebugList$20.yesPerformed(PageDebugList.java:946)
              at com.evolveum.midpoint.web.component.dialog.ConfirmationPanel$1.onClick(ConfirmationPanel.java:77)
              at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:85)
              at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:127)
              at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:598)
              at org.apache.wicket.core.request.handler.ListenerRequestHandler.internalInvoke(ListenerRequestHandler.java:306)
              at org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler.java:280)
              at org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:222)
              at org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:208)
              at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:914)
              at org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:65)
              at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:282)
              at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:253)
              at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:221)
              at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:275)
              at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:206)
              at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:299)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at com.evolveum.midpoint.web.util.MidPointProfilingServletFilter.doFilter(MidPointProfilingServletFilter.java:85)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      ....
      Caused by: java.lang.IllegalArgumentException: Unknown ordinal value [2] for enum class [com.evolveum.midpoint.repo.sql.data.common.enums.RTaskWaitingR
      eason]
              at org.hibernate.type.EnumType$OrdinalEnumValueMapper.fromOrdinal(EnumType.java:357)
              at org.hibernate.type.EnumType$OrdinalEnumValueMapper.getValue(EnumType.java:346)
              at org.hibernate.type.EnumType.nullSafeGet(EnumType.java:231)
              at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:119)
              at org.hibernate.type.AbstractType.hydrate(AbstractType.java:82)
              at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2854)
              at com.evolveum.midpoint.repo.sql.util.MidPointJoinedPersister.hydrate(MidPointJoinedPersister.java:41)
              at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1747)
              at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1673)
              at org.hibernate.loader.Loader.getRow(Loader.java:1562)
              at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:732)
              at org.hibernate.loader.Loader.processResultSet(Loader.java:991)
              at org.hibernate.loader.Loader.doQuery(Loader.java:949)
              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)
              at org.hibernate.loader.Loader.doList(Loader.java:2692)
              at org.hibernate.loader.Loader.doList(Loader.java:2675)
              at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2507)
              at org.hibernate.loader.Loader.list(Loader.java:2502)
              at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:502)
              at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:384)
              at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
              at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1490)
              at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1445)
              at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1414)
              at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1457)
              at org.hibernate.query.criteria.internal.compile.CriteriaQueryTypeQueryAdapter.uniqueResult(CriteriaQueryTypeQueryAdapter.java:77)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.deleteObjectAttempt(ObjectUpdater.java:329)
              ... 121 common frames omitted2020-03-17 11:14:25,200 [REPOSITORY] [http-nio-8080-exec-4] WARN (com.evolveum.midpoint.prism.impl.marshaller.PrismUnmarshaller): Item {http://midpoint.evolveum.com/xml/ns/public/common/common-3}workflowContext has no definition (in container value CTD ({.../common/common-3}TaskType))while parsing (
        oid => 
          parser ValueParser(DOMa, oid: e1cab3b2-222c-4fe0-9e3d-54045a84123b)
        version => 
          parser ValueParser(DOMa, version: 15)
        {...common/common-3}name => 
          Approval of: Assigning role "Patron" to user "michelangelo" (class com.evolveum.midpoint.prism.polystring.PolyString)
        {...common/common-3}taskIdentifier => 
          1583825933401-0-1 (class java.lang.String)
        {...common/common-3}ownerRef => 
          (
            oid => 
              00000000-0000-0000-0000-000000000002 (class java.lang.String)
            relation => 
              {...common/org-3}default (class javax.xml.namespace.QName)
            type => 
              {...common/common-3}UserType (class javax.xml.namespace.QName)
          )
        {...common/common-3}channel => 
          http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user (class java.lang.String)
        {...common/common-3}parent => 
          1583825933364-0-1 (class java.lang.String)
        {...common/common-3}executionStatus => 
          closed (class java.lang.String)
        {...common/common-3}waitingReason => 
          other (class java.lang.String)
        {...common/common-3}category => 
          Workflow (class java.lang.String)
        {...common/common-3}handlerUri => 
          http://midpoint.evolveum.com/xml/ns/public/workflow/process-instance-shadow/handler-3 (class java.lang.String)
        {...common/common-3}resultStatus => 
          success (class java.lang.String)
        {...common/common-3}objectRef => 
          (
            oid => 
              8d2fee1a-781f-4ea1-b2fb-76cd3e2e2252 (class java.lang.String)
            relation => 
              {...common/org-3}default (class javax.xml.namespace.QName)
            type => 
              {...common/common-3}UserType (class javax.xml.namespace.QName)
      ... 

      the task was in repository and it was unable to delete it via GUI or even via ninja.

      Attachments

        Activity

          People

            mspanik Martin Spanik
            mspanik Martin Spanik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: