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

Obscure system exception during reconciliation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 4.0
    • Model
    • Active subscription
    • M4

    Description

      Reconciliation worker thrown this error:

      SystemException: Couldn't evaluate expression ExpressionType(variable=[],evaluator=script:com.evolveum.midpoint.xml.ns._public.common.common_3.ScriptExpressionEvaluatorType@51002c62[code=<null>,language=<null>,returnType=<null>,objectVariableMode=<null>,description=<null>,trace=<null>,relativityMode=<null>,includeNullInputs=<null>,allowEmptyValues=<null>,condition=<null>]): No script code in (new) expression in mapping 'Access role assignment' in template mapping 'Access role (assignment' in objectTemplate:191b00b3-1e2b-4296-a5cb-f756a65d2b5f(User Template - Default)(actor=user:00000000-0000-0000-0000-000000000002(administrator); null=user:f3bb918a-2c4b-4315-9e16-b718fb5b7d95(XXXXX); configuration=systemConfiguration:00000000-0000-0000-0000-000000000001(SystemConfiguration); assignmentPath=null; focus=user:f3bb918a-2c4b-4315-9e16-b718fb5b7d95(XXXXX); iteration=0; memberOf=PPV(String:YYY;d;1478250455000;w;d); user=user:f3bb918a-2c4b-4315-9e16-b718fb5b7d95(XXXXX); operation=modify; iterationToken=; ) in expression in mapping 'Access role assignment' in template mapping 'Access role assignment' in objectTemplate:191b00b3-1e2b-4296-a5cb-f756a65d2b5f(User Template - Default) 

      Mapping mentioned in exception

      <mapping>
          <name>Access role assignment</name>
          <strength>strong</strength>
          <source>
              <path>extension/memberOf</path>
          </source>
          <expression>
              <assignmentTargetSearch>
                  <targetType>c:RoleType</targetType>
                  <filter>
                      <q:equal>
                          <q:path>c:name</q:path>
                          <expression>
                              <script>
                                      <code>
                                          return memberOf.split(";", -1)[0]
                                      </code>
                                  </script>
                          </expression>
                      </q:equal>
                  </filter>
                  <populate>
                      <populateItem>
                          <expression>
                              <script>
                                      <code>
                                          return memberOf.split(";", -1)[1]
                                      </code>
                                  </script>
                          </expression>
                          <target>
                              <path>extension/recStatus</path>
                          </target>
                      </populateItem>
                      <populateItem>
                          <expression>
                              <script>
                                      <code>
                                          import com.evolveum.midpoint.prism.xml.XmlTypeConverter
      
                                          String val = memberOf.split(";",-1)[2]
                                          if (val == null || val.isEmpty()) {
                                              return null
                                          }
      
                                          long milis = Long.parseLong(val)
                                          Date date = new Date(milis)
                                          return XmlTypeConverter.createXMLGregorianCalendar(date)
                                      </code>
                                  </script>
                          </expression>
                          <target>
                              <path>extension/validityEnd</path>
                          </target>
                      </populateItem>
                      <populateItem>
                          <expression>
                              <value>XXXX</value>
                          </expression>
                          <target>
                              <path>subtype</path>
                          </target>
                      </populateItem>
                  </populate>
              </assignmentTargetSearch>
          </expression>
          <target>
              <path>assignment</path>
          </target>
          <condition>
              <script>             
                      <code>
                          return memberOf != null                        
                      </code>
                  </script>
          </condition>
      </mapping>

      No empty script....

      Attachments

        Issue Links

          Activity

            People

              lazyman Viliam Repan
              lazyman Viliam Repan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: