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

Can't assign org using org. tree with archetypes: OrgType vs. RoleType problem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      MID101, archetypes

      Description

      I'm using organizational structure with archetypes and now trying to make user a member.

      In Org. tree I go to the proper organization.

      Then in Member section, I click "Assign" button, then select the first sub-button in the archetyped lists and then select user in the list.

      Saving will log this:

      2019-05-02 10:43:05,732 [] [midPointScheduler_Worker-2] WARN (com.evolveum.midpoint.repo.common.expression.ExpressionUtil): No valueExpression in filter in bulk action query. Returning original filter
      2019-05-02 10:43:05,797 [] [midPointScheduler_Worker-2] INFO (com.evolveum.midpoint.audit.log): 2019-05-02T10:43:05.794+0200 eid=1556786585794-0-1, et=MODIFY_OBJECT, es=REQUEST, sid=1556786585598-0-1, rid=9a931896-cbb5-484f-b351-59f3cb41f6d2, tid=1556786585598-0-1, toid=399d530f-7ff0-4b01-9dff-34c246484f30, hid=null, nid=DefaultNode, raddr=null, I=FocusType:00000000-0000-0000-0000-000000000002(user), T=PRV(oid=acc9ed61-ae2a-4ea6-8495-58586d7a8416, targetType={.../common/common-3}UserType, targetName=kirk, relation={.../common/org-3}default), TO=null, D=[acc9ed61-ae2a-4ea6-8495-58586d7a8416:MODIFY], ch=http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user, o=null, p=null, m=
      2019-05-02 10:43:05,797 [] [midPointScheduler_Worker-2] DEBUG (com.evolveum.midpoint.audit.log): Details of event 1556786585794-0-1 stage REQUEST
      Deltas:
        ObjectDeltaOperation
          Delta:
            ObjectDelta<UserType>(UserType:acc9ed61-ae2a-4ea6-8495-58586d7a8416,MODIFY):
              assignment
                ADD:
                  id=null
                    targetRef: oid=63ae42a7-153f-42aa-a7a7-9330b2778224(RoleType)[default]
          Execution result: null
          Object name:
            PolyString(kirk,kirk)
      2019-05-02 10:43:05,851 [] [midPointScheduler_Worker-2] INFO (com.evolveum.midpoint.audit.log): 2019-05-02T10:43:05.851+0200 eid=1556786585851-0-1, et=MODIFY_OBJECT, es=EXECUTION, sid=1556786585598-0-1, rid=9a931896-cbb5-484f-b351-59f3cb41f6d2, tid=1556786585598-0-1, toid=399d530f-7ff0-4b01-9dff-34c246484f30, hid=null, nid=DefaultNode, raddr=null, I=FocusType:00000000-0000-0000-0000-000000000002(user), T=PRV(oid=acc9ed61-ae2a-4ea6-8495-58586d7a8416, targetType={.../common/common-3}UserType, targetName=kirk, relation={.../common/org-3}default), TO=null, D=[], ch=http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user, o=FATAL_ERROR, p=null, m=Expected to find 'RoleType' but found 'OrgType' (org:63ae42a7-153f-42aa-a7a7-9330b2778224(0919)). Bad OID in a reference? in delta for user:acc9ed61-ae2a-4ea6-8495-58586d7a8416(kirk)
      2019-05-02 10:43:05,851 [] [midPointScheduler_Worker-2] DEBUG (com.evolveum.midpoint.audit.log): Details of event 1556786585851-0-1 stage EXECUTION
      Deltas:
      2019-05-02 10:43:06,003 [] [midPointScheduler_Worker-2] ERROR (com.evolveum.midpoint.model.impl.controller.ModelController): Couldn't search objects in repository.
      com.evolveum.midpoint.util.exception.SystemException: com.evolveum.midpoint.model.api.ScriptExecutionException: Couldn't execute action 'assign' on POV:user:acc9ed61-ae2a-4ea6-8495-58586d7a8416(kirk): Couldn't modify object: Expected to find 'RoleType' but found 'OrgType' (org:63ae42a7-153f-42aa-a7a7-9330b2778224(0919)). Bad OID in a reference? in delta for user:acc9ed61-ae2a-4ea6-8495-58586d7a8416(kirk)
              at com.evolveum.midpoint.model.impl.scripting.expressions.SearchEvaluator.lambda$evaluate$1(SearchEvaluator.java:156)
              at com.evolveum.midpoint.model.impl.controller.ModelController.lambda$searchObjectsIterative$1(ModelController.java:1166)
              at com.evolveum.midpoint.repo.cache.RepositoryCache.lambda$searchObjectsIterative$0(RepositoryCache.java:391)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.searchObjectsIterativeByPagingStrictlySequential(ObjectRetriever.java:894)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.searchObjectsIterative(SqlRepositoryServiceImpl.java:912)
              at com.evolveum.midpoint.repo.cache.RepositoryCache.searchObjectsIterative(RepositoryCache.java:395)
              at com.evolveum.midpoint.model.impl.controller.ModelController.searchObjectsIterative(ModelController.java:1176)
              at com.evolveum.midpoint.model.impl.scripting.expressions.SearchEvaluator.evaluate(SearchEvaluator.java:167)
              at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.evaluateExpression(ScriptingExpressionEvaluator.java:205)
              at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.evaluateExpression(ScriptingExpressionEvaluator.java:175)
              at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.evaluateExpression(ScriptingExpressionEvaluator.java:148)
              at com.evolveum.midpoint.model.impl.controller.ModelController.evaluateExpression(ModelController.java:2126)
              at com.evolveum.midpoint.model.impl.scripting.ScriptExecutionTaskHandler.run(ScriptExecutionTaskHandler.java:80)
              at com.evolveum.midpoint.task.quartzimpl.execution.HandlerExecutor.executePlainTaskHandler(HandlerExecutor.java:72)
              at com.evolveum.midpoint.task.quartzimpl.execution.HandlerExecutor.executeHandler(HandlerExecutor.java:64)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeHandler(JobExecutor.java:663)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeSingleTask(JobExecutor.java:481)
              at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.execute(JobExecutor.java:198)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:588)
      Caused by: com.evolveum.midpoint.model.api.ScriptExecutionException: Couldn't execute action 'assign' on POV:user:acc9ed61-ae2a-4ea6-8495-58586d7a8416(kirk): Couldn't modify object: Expected to find 'RoleType' but found 'OrgType' (org:63ae42a7-153f-42aa-a7a7-9330b2778224(0919)). Bad OID in a reference? in delta for user:acc9ed61-ae2a-4ea6-8495-58586d7a8416(kirk)
              at com.evolveum.midpoint.model.impl.scripting.actions.BaseActionExecutor.processActionException(BaseActionExecutor.java:131)
              at com.evolveum.midpoint.model.impl.scripting.actions.AssignmentOperationsExecutor.execute(AssignmentOperationsExecutor.java:130)
              at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.executeAction(ScriptingExpressionEvaluator.java:228)
              at com.evolveum.midpoint.model.impl.scripting.ScriptingExpressionEvaluator.evaluateExpression(ScriptingExpressionEvaluator.java:207)
              at com.evolveum.midpoint.model.impl.scripting.expressions.SearchEvaluator.lambda$evaluate$1(SearchEvaluator.java:143)
              ... 19 common frames omitted
      Caused by: com.evolveum.midpoint.model.api.ScriptExecutionException: Couldn't modify object: Expected to find 'RoleType' but found 'OrgType' (org:63ae42a7-153f-42aa-a7a7-9330b2778224(0919)). Bad OID in a reference? in delta for user:acc9ed61-ae2a-4ea6-8495-58586d7a8416(kirk)
              at com.evolveum.midpoint.model.impl.scripting.helpers.OperationsHelper.applyDelta(OperationsHelper.java:86)
              at com.evolveum.midpoint.model.impl.scripting.actions.AssignmentOperationsExecutor.execute(AssignmentOperationsExecutor.java:126)
              ... 22 common frames omitted
      Caused by: com.evolveum.midpoint.util.exception.SchemaException: Expected to find 'RoleType' but found 'OrgType' (org:63ae42a7-153f-42aa-a7a7-9330b2778224(0919)). Bad OID in a reference? in delta for user:acc9ed61-ae2a-4ea6-8495-58586d7a8416(kirk)
              at com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator.resolveTargets(AssignmentEvaluator.java:712)
              at com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator.getTargets(AssignmentEvaluator.java:667)
              at com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator.evaluateSegmentContent(AssignmentEvaluator.java:483)
              at com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator.evaluateFromSegment(AssignmentEvaluator.java:345)
              at com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator.evaluate(AssignmentEvaluator.java:251)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.AssignmentTripleEvaluator.evaluateAssignment(AssignmentTripleEvaluator.java:579)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.AssignmentTripleEvaluator.processAssignment(AssignmentTripleEvaluator.java:383)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.AssignmentTripleEvaluator.processAllAssignments(AssignmentTripleEvaluator.java:237)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.AssignmentProcessor.processAssignmentsProjectionsWithFocus(AssignmentProcessor.java:237)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.AssignmentProcessor.processAssignmentsProjections(AssignmentProcessor.java:167)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.AssignmentHolderProcessor.lambda$processFocusFocus$4(AssignmentHolderProcessor.java:242)
              at com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:174)
              at com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:154)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.AssignmentHolderProcessor.processFocusFocus(AssignmentHolderProcessor.java:241)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.AssignmentHolderProcessor.processFocus(AssignmentHolderProcessor.java:125)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.lambda$projectInternal$1(Projector.java:217)
              at com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:174)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.projectInternal(Projector.java:215)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.project(Projector.java:102)
              at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:494)
              at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:204)
              at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:560)
              at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:348)
              at com.evolveum.midpoint.model.impl.scripting.helpers.OperationsHelper.applyDelta(OperationsHelper.java:83)
              ... 23 common frames omitted
      Caused by: com.evolveum.midpoint.util.exception.SchemaException: Expected to find 'RoleType' but found 'OrgType' (org:63ae42a7-153f-42aa-a7a7-9330b2778224(0919)). Bad OID in a reference?
              at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.validateObjectType(ObjectRetriever.java:699)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.updateLoadedObject(ObjectRetriever.java:598)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.getObjectInternal(ObjectRetriever.java:207)
              at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.getObjectAttempt(ObjectRetriever.java:106)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.lambda$getObject$0(SqlRepositoryServiceImpl.java:213)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.executeAttempts(SqlRepositoryServiceImpl.java:233)
              at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.getObject(SqlRepositoryServiceImpl.java:212)
              at com.evolveum.midpoint.repo.cache.RepositoryCache.getObjectInternal(RepositoryCache.java:262)
              at com.evolveum.midpoint.repo.cache.RepositoryCache.getObjectTryGlobalCache(RepositoryCache.java:226)
              at com.evolveum.midpoint.repo.cache.RepositoryCache.getObject(RepositoryCache.java:208)
              at com.evolveum.midpoint.model.impl.lens.AssignmentEvaluator.resolveTargets(AssignmentEvaluator.java:710)
              ... 46 common frames omitted
      
      

        Attachments

          Activity

            People

            • Assignee:
              vix Ivan Noris
              Reporter:
              vix Ivan Noris
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: