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

Simple Object template causes projector to throw NPE (worked in 3.7)

    XMLWordPrintable

    Details

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

      Description

      Template:

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- (c) 2011-2018 Evolveum, All rights reserved -->
      
      <!-- Basic User template -->
      <!-- DO NOT FORGET TO LINK THIS TEMPLATE IN SYSTEM CONFIGURATION !!! -->
      
      <objectTemplate oid="10000000-9999-9999-0000-a000fe000001"
         xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
         xmlns='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
         xmlns:c='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
         xmlns:t='http://prism.evolveum.com/xml/ns/public/types-3'
         xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3">
          <name>ExAmPLE User Template</name>
          
          <mapping>
            <name>ExAmPLE, Inc. User Template: Fullname</name>
            <description>Generate fullname (enforcing, no weak mapping)</description>
            <strength>strong</strength>
            <source>
              <path>$user/givenName</path>
            </source>
            <source>
              <path>$user/familyName</path>
            </source>
            <expression>
              <script>
                  <code>
                      basic.concatName(givenName, familyName)
                  </code>
              </script>
            </expression>
            <target>
              <path>fullName</path>
            </target>
          </mapping>
      
      </objectTemplate>
      

      2. template is set as global for User
      3. attempt to reconcile user or even create new one fails:

      2018-05-11 09:24:38,910 [] [pool-3-thread-6] INFO (com.evolveum.midpoint.audit.log): 2018-05-11T09:24:38.910+0200 eid=1526023478910-0-1, et=ADD_OBJECT, es=REQUEST, sid=8F161950FFE74874
      FA677305B33E3AA9, tid=1526023478885-0-1, toid=null, hid=192.168.56.20, nid=DefaultNode, raddr=192.168.56.1, I=FocusType:00000000-0000-0000-0000-000000000002({http://midpoint.evolveum.c
      om/xml/ns/public/common/common-3}user), T=FocusType:null({http://midpoint.evolveum.com/xml/ns/public/common/common-3}user), TO=null, D=[null:ADD], ch=http://midpoint.evolveum.com/xml/n
      s/public/gui/channels-3#user, o=null, p=null, m=
      2018-05-11 09:24:38,914 [] [pool-3-thread-6] DEBUG (com.evolveum.midpoint.audit.log): Details of event 1526023478910-0-1 stage REQUEST
      Deltas:
        ObjectDeltaOperation
          Delta:
            ObjectDelta<UserType>(UserType:null,ADD):
              user: (null, UserType)
                  name: asd
                  fullName: []
                  givenName: a
                  familyName: b
                  additionalName: []
                  nickName: []
                  honorificPrefix: []
                  honorificSuffix: []
                  title: []
                  organization: []
                  organizationalUnit: []
                  locality: []
          Execution result: null
          Object name: null
      2018-05-11 09:24:38,932 [] [pool-3-thread-6] ERROR (com.evolveum.midpoint.model.impl.lens.projector.Projector): Runtime error in projector: null
      java.lang.NullPointerException: null
              at com.evolveum.midpoint.model.impl.lens.projector.focus.FocusProcessor.applyObjectPolicyConstraints(FocusProcessor.java:422)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.FocusProcessor.processFocusFocus(FocusProcessor.java:157)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.FocusProcessor.processFocus(FocusProcessor.java:123)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.lambda$projectInternal$1(Projector.java:214)
              at com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:170)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.projectInternal(Projector.java:212)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.project(Projector.java:101)
              at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:437)
              at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:196)
              at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:547)
              at com.evolveum.midpoint.web.component.progress.ProgressPanel$14.callWithContextPrepared(ProgressPanel.java:605)
              at com.evolveum.midpoint.web.component.progress.ProgressPanel$14.callWithContextPrepared(ProgressPanel.java:591)
              at com.evolveum.midpoint.web.component.SecurityContextAwareCallable.call(SecurityContextAwareCallable.java:59)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      2018-05-11 09:24:38,934 [] [pool-3-thread-6] INFO (com.evolveum.midpoint.audit.log): 2018-05-11T09:24:38.934+0200 eid=1526023478934-0-1, et=ADD_OBJECT, es=EXECUTION, sid=8F161950FFE74874FA677305B33E3AA9, tid=1526023478885-0-1, toid=null, hid=192.168.56.20, nid=DefaultNode, raddr=192.168.56.1, I=FocusType:00000000-0000-0000-0000-000000000002({http://midpoint.evolveum.com/xml/ns/public/common/common-3}user), T=PRV(oid=null, targetType={.../common/common-3}UserType, targetName=asd, 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=null
      2018-05-11 09:24:38,934 [] [pool-3-thread-6] DEBUG (com.evolveum.midpoint.audit.log): Details of event 1526023478934-0-1 stage EXECUTION
      Deltas:
      2018-05-11 09:24:38,939 [] [pool-3-thread-6] ERROR (com.evolveum.midpoint.web.component.progress.ProgressPanel): Error executing changes.
      java.lang.NullPointerException: null
              at com.evolveum.midpoint.model.impl.lens.projector.focus.FocusProcessor.applyObjectPolicyConstraints(FocusProcessor.java:422)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.FocusProcessor.processFocusFocus(FocusProcessor.java:157)
              at com.evolveum.midpoint.model.impl.lens.projector.focus.FocusProcessor.processFocus(FocusProcessor.java:123)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.lambda$projectInternal$1(Projector.java:214)
              at com.evolveum.midpoint.model.impl.lens.ClockworkMedic.partialExecute(ClockworkMedic.java:170)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.projectInternal(Projector.java:212)
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.project(Projector.java:101)
              at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:437)
              at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:196)
              at com.evolveum.midpoint.model.impl.controller.ModelController.executeChanges(ModelController.java:547)
              at com.evolveum.midpoint.web.component.progress.ProgressPanel$14.callWithContextPrepared(ProgressPanel.java:605)
              at com.evolveum.midpoint.web.component.progress.ProgressPanel$14.callWithContextPrepared(ProgressPanel.java:591)
              at com.evolveum.midpoint.web.component.SecurityContextAwareCallable.call(SecurityContextAwareCallable.java:59)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Issue Links

            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: