<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>That's great. I am now not sure - have you implemented a
      (limited) executeQuery method that would allow midPoint to fetch
      your resource objects "by UID"?</p>
    <p>Also, I become more and more interested to see the stack trace of
      the "SchemaException" you mentioned. :) I would like to know the
      path between points 3 and 4 in your description below, i.e.
      creating an object and trying to determine its name.</p>
    <p>Best regards,<br>
    </p>
    <pre class="moz-signature" cols="72">-- 
Pavol Mederly
Software developer
evolveum.com</pre>
    <div class="moz-cite-prefix">On 07/07/2022 15:19, Wang, Xiaoshu
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:BL0PR03MB4243F2B96A2113362453BF2E9C839@BL0PR03MB4243.namprd03.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}@font-face
        {font-family:"Courier New \;color\:\#0033B3";
        panose-1:2 7 3 9 2 2 5 2 4 4;}@font-face
        {font-family:"Courier New \;color\:black";
        panose-1:2 7 3 9 2 2 5 2 4 4;}@font-face
        {font-family:"Courier New \;color\:\#00627A";
        panose-1:2 7 3 9 2 2 5 2 4 4;}@font-face
        {font-family:"Courier New \;color\:\#3F9101";
        panose-1:2 7 3 9 2 2 5 2 4 4;}@font-face
        {font-family:"Courier New \;color\:\#080808";
        panose-1:2 7 3 9 2 2 5 2 4 4;}@font-face
        {font-family:"Courier New \;color\:\#0E4A8E";
        panose-1:2 7 3 9 2 2 5 2 4 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}ol
        {margin-bottom:0in;}ul
        {margin-bottom:0in;}</style>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:16.0pt">Yes, I can
            execute a single query given a UID.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:16.0pt"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="font-size:16.0pt">Xiaoshu<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size:16.0pt"><o:p> </o:p></span></p>
        <div style="border:none;border-top:solid #B5C4DF
          1.0pt;padding:3.0pt 0in 0in 0in">
          <p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
                style="font-size:12.0pt;color:black">From:
              </span></b><span style="font-size:12.0pt;color:black">midPoint
              <a class="moz-txt-link-rfc2396E" href="mailto:midpoint-bounces@lists.evolveum.com"><midpoint-bounces@lists.evolveum.com></a> on behalf of
              Pavol Mederly via midPoint
              <a class="moz-txt-link-rfc2396E" href="mailto:midpoint@lists.evolveum.com"><midpoint@lists.evolveum.com></a><br>
              <b>Date: </b>Thursday, July 7, 2022 at 6:32 AM<br>
              <b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
              <a class="moz-txt-link-rfc2396E" href="mailto:midPoint@lists.evolveum.com"><midPoint@lists.evolveum.com></a><br>
              <b>Cc: </b>Pavol Mederly <a class="moz-txt-link-rfc2396E" href="mailto:mederly@evolveum.com"><mederly@evolveum.com></a><br>
              <b>Subject: </b>Re: [midPoint] Couldn't determine shadow
              name<o:p></o:p></span></p>
        </div>
        <p>Hello Xiaoshu,<o:p></o:p></p>
        <p>OK, I understand that you cannot execute a "blank" query that
          would return all objects on a resource. But can you execute -
          at least - a query for one specific object, identified by UID?<o:p></o:p></p>
        <p>--<o:p></o:p></p>
        <p>Just by the way, could you share the whole stack trace of the
          "SchemaException: Could not determine shadow name"? I am quite
          interested in the whole execution path there. And, the exact
          midPoint version.<o:p></o:p></p>
        <p>Best regards,<o:p></o:p></p>
        <pre>-- <o:p></o:p></pre>
        <pre>Pavol Mederly<o:p></o:p></pre>
        <pre>Software developer<o:p></o:p></pre>
        <pre>evolveum.com<o:p></o:p></pre>
        <div>
          <p class="MsoNormal">On 06/07/2022 20:00, Wang, Xiaoshu via
            midPoint wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span style="font-size:16.0pt">Pavol:</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">I am not
              sure how. </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">The icf
              connector’s create signature is this. And see the
              implementation</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal" style="background:white"><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#0033B3";color:black">public
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">Uid
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#00627A";color:black">create</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#3F9101";color:black">(</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">ObjectClass
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#080808";color:black">objectClass,
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">Set</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#3F9101";color:black"><</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">Attribute</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#3F9101";color:black">>
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#080808";color:black">attributes,
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">OperationOptions
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#080808";color:black">operationOptions</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#3F9101";color:black">) {</span><o:p></o:p></p>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:black">Optional</span><span style="font-size:12.0pt;color:#3F9101"><</span><span style="font-size:12.0pt;color:black">String</span><span style="font-size:12.0pt;color:#3F9101">> </span><span style="font-size:12.0pt;color:black">pid </span><span style="font-size:12.0pt;color:#080808">= </span><span style="font-size:12.0pt;color:black">CsUtil</span><span style="font-size:12.0pt;color:#080808">.<i>findPid</i></span><span style="font-size:12.0pt;color:#3F9101">(</span><span style="font-size:12.0pt;color:#080808">attributes</span><span style="font-size:12.0pt;color:#3F9101">)</span><span style="font-size:12.0pt;color:#080808">;<o:p></o:p></span></pre>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:#0033B3">if </span><span style="font-size:12.0pt;color:#3F9101">(</span><span style="font-size:12.0pt;color:black">pid</span><span style="font-size:12.0pt;color:#080808">.isPresent</span><span style="font-size:12.0pt;color:#0E4A8E">()</span><span style="font-size:12.0pt;color:#3F9101">) </span><span style="font-size:12.0pt;color:#BCBF01">{<o:p></o:p></span></pre>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:#BCBF01">    </span><i><span style="font-size:12.0pt;color:#871094">LOG</span></i><span style="font-size:12.0pt;color:#080808">.info</span><span style="font-size:12.0pt;color:#0E4A8E">(</span><span style="font-size:12.0pt;color:#067D17">">>> Done CsCreate.create"</span><span style="font-size:12.0pt;color:#0E4A8E">)</span><span style="font-size:12.0pt;color:#080808">;<o:p></o:p></span></pre>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:#080808">    </span><span style="font-size:12.0pt;color:black">Name name </span><span style="font-size:12.0pt;color:#080808">= </span><span style="font-size:12.0pt;color:#0033B3">new </span><span style="font-size:12.0pt;color:#080808">Name</span><span style="font-size:12.0pt;color:#0E4A8E">(</span><span style="font-size:12.0pt;color:black">pid</span><span style="font-size:12.0pt;color:#080808">.get</span><span style="font-size:12.0pt;color:#BCBF01">()</span><span style="font-size:12.0pt;color:#0E4A8E">)</span><span style="font-size:12.0pt;color:#080808">;<o:p></o:p></span></pre>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:#080808">    </span><span style="font-size:12.0pt;color:black">Uid uid </span><span style="font-size:12.0pt;color:#080808">= </span><span style="font-size:12.0pt;color:#0033B3">new </span><span style="font-size:12.0pt;color:#080808">Uid</span><span style="font-size:12.0pt;color:#0E4A8E">(</span><span style="font-size:12.0pt;color:black">pid</span><span style="font-size:12.0pt;color:#080808">.get</span><span style="font-size:12.0pt;color:#BCBF01">()</span><span style="font-size:12.0pt;color:#080808">, </span><span style="font-size:12.0pt;color:black">name</span><span style="font-size:12.0pt;color:#0E4A8E">)</span><span style="font-size:12.0pt;color:#080808">;<o:p></o:p></span></pre>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:#080808">    </span><span style="font-size:12.0pt;color:#0033B3">return </span><span style="font-size:12.0pt;color:black">uid</span><span style="font-size:12.0pt;color:#080808">;<o:p></o:p></span></pre>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:#BCBF01">} </span><span style="font-size:12.0pt;color:#0033B3">else </span><span style="font-size:12.0pt;color:#BCBF01">{<o:p></o:p></span></pre>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:#BCBF01">    </span><span style="font-size:12.0pt;color:#0033B3">throw new </span><span style="font-size:12.0pt;color:#080808">IllegalArgumentException</span><span style="font-size:12.0pt;color:#0E4A8E">(</span><span style="font-size:12.0pt;color:#067D17">"Cannot create because PID is empty"</span><span style="font-size:12.0pt;color:#0E4A8E">)</span><span style="font-size:12.0pt;color:#080808">;<o:p></o:p></span></pre>
          <pre style="margin-left:45.8pt;background:white"><span style="font-size:12.0pt;color:#BCBF01">}</span><o:p></o:p></pre>
          <p class="MsoNormal" style="background:white"><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#3F9101";color:black">}</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">I can only
              return a Uid object. Providing the nameHint seems have no
              effect.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">Most
              “standard” resource will go through the executeQuery
              method (e.g, through an inititial import).</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal" style="background:white"><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#0033B3";color:black">public void
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#00627A";color:black">executeQuery</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#3F9101";color:black">(</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">ObjectClass
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#080808";color:black">objectClass,
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">PersonSearch
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#080808";color:black">personSearch,
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">ResultsHandler
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#080808";color:black">resultsHandler,
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:black";color:black">OperationOptions
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#080808";color:black">operationOptions</span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#3F9101";color:black">)
            </span><span
              style="font-size:12.0pt;font-family:"Courier New
              \;color\:\#0E4A8E";color:black">{</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">Here, you
              can construct a connectorObject and ask the resultHandler
              to handle it. So, I can set both uid and name to whatever
              I want.
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">But,
              because my resource cannot do the blank query so the
              midpoint will call the create method when needed. But the
              create() is unaware of connectorObject, it only returns a
              unique handle, i.e., the UID.
            </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">What I
              guess is this.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <ol style="margin-top:0in" type="1" start="1">
            <li class="MsoListParagraph"
              style="margin-left:0in;mso-list:l1 level1 lfo3"><span
                style="font-size:16.0pt">A property-change triggers an
                outbound mapping</span><o:p></o:p></li>
            <li class="MsoListParagraph"
              style="margin-left:0in;mso-list:l1 level1 lfo3"><span
                style="font-size:16.0pt">Midpoint notices the absence of
                a shadow account for the outbound resource</span><o:p></o:p></li>
            <li class="MsoListParagraph"
              style="margin-left:0in;mso-list:l1 level1 lfo3"><span
                style="font-size:16.0pt">Midpoint called the
                connector.create() method to create the intended
                resource and subsequently create the shadowObject with
                the returned uid.</span><o:p></o:p></li>
            <li class="MsoListParagraph"
              style="margin-left:0in;mso-list:l1 level1 lfo3"><span
                style="font-size:16.0pt">At a later stage, it triggers
                the ShadowUtil.determineShadowName method and throw an
                exception when found absent.</span><o:p></o:p></li>
          </ol>
          <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">A
              potential remedy is step #3, when midpoint can use the
              nameHint of the Uid object to fill in the name of the
              shadow account.</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:16.0pt">Xiaoshu</span><o:p></o:p></p>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
                  style="font-size:12.0pt;color:black">From:
                </span></b><span style="font-size:12.0pt;color:black">midPoint
                <a href="mailto:midpoint-bounces@lists.evolveum.com"
                  moz-do-not-send="true">
                  <midpoint-bounces@lists.evolveum.com></a> on
                behalf of Pavol Mederly via midPoint
                <a href="mailto:midpoint@lists.evolveum.com"
                  moz-do-not-send="true"><midpoint@lists.evolveum.com></a><br>
                <b>Date: </b>Wednesday, July 6, 2022 at 1:35 PM<br>
                <b>To: </b><a href="mailto:midpoint@lists.evolveum.com"
                  moz-do-not-send="true" class="moz-txt-link-freetext">midpoint@lists.evolveum.com</a>
                <a href="mailto:midpoint@lists.evolveum.com"
                  moz-do-not-send="true"><midpoint@lists.evolveum.com></a><br>
                <b>Cc: </b>Pavol Mederly <a
                  href="mailto:mederly@evolveum.com"
                  moz-do-not-send="true"><mederly@evolveum.com></a><br>
                <b>Subject: </b>Re: [midPoint] Couldn't determine
                shadow name</span><o:p></o:p></p>
          </div>
          <p>Hello Xiaoshu,<o:p></o:p></p>
          <p>I am still not sure I completely understand your use case,
            but maybe the simplest thing your connector can do is to
            mirror __UID__ to __NAME__ itself (if the name is not
            known). This is actually what many connectors do.<o:p></o:p></p>
          <p>See also <a
href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.evolveum.com%2Fconnectors%2Fconnid%2F1.x%2Fconnector-development-guide%2F%23__uid__-and-__name__-are-the-same&data=05%7C01%7C%7Cb358cbf8006f43e68b3208da6003f3e1%7C58b3d54f16c942d3af081fcabd095666%7C1%7C0%7C637927867354521446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9MZFy7Q20y%2BororSBawGAzxmZ3lBBBOcCv%2FmmIKoX5w%3D&reserved=0"
              moz-do-not-send="true">
https://docs.evolveum.com/connectors/connid/1.x/connector-development-guide/#__uid__-and-__name__-are-the-same</a>.<o:p></o:p></p>
          <p>I am not sure why both of these are obligatory in ConnId
            (originally ICF, then OpenICF).<o:p></o:p></p>
          <p>The <span style="font-family:"Courier New"">ShadowUtil.determineShadowName</span>
            method is maybe not very consistent, I must admit. (I have
            looked at it right now.) For example, it is called from a
            couple of places in midPoint, and a caller usually catches
            SchemaException, and continues with "no name" situation. I
            am not sure about your specific situation, because I don't
            know exact midPoint version, whole stack trace, and so on.
            But I think the best you can do is simply to return both
            __UID__ and __NAME__ from your connector, and (hopefully)
            midPoint will be happy with it.<o:p></o:p></p>
          <p>Best regards,<o:p></o:p></p>
          <pre>-- <o:p></o:p></pre>
          <pre>Pavol Mederly<o:p></o:p></pre>
          <pre>Software developer<o:p></o:p></pre>
          <pre>evolveum.com<o:p></o:p></pre>
          <div>
            <p class="MsoNormal">On 06/07/2022 17:34, Wang, Xiaoshu via
              midPoint wrote:<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoNormal"><span style="font-size:16.0pt">Pavol:</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt">Conceptually,
                I know “why” it throws the exception but I wonder if it
                can be considered as a “bug” or “improvement” for the
                midpoint.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt">I have a
                particular use case, where I have a resource that I only
                need to do outbound mapping. The resource, however, does
                not provide an API for me to do something like getAll()
                operations. In other words, I cannot do an initial
                import kind of task to force midpoint to create all the
                shadow account.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt">Thus,
                when a property change that triggers an outbound
                mapping, midpoint noted that the resource does not
                exist, so it calls the create() method on the connector.
                Unlike the executeQuery method, which can construct a
                connectorObject and ask midpoint to handle it. The
                create method can only return a “Uid”. I understand the
                rational under this as the connector.create() is meant
                to create a remote resource as opposed to create the
                shadow account, (I guess is mirrored by the
                connectorObject). Upon receiving the UID, the midpoint
                then creates a matching shadow account with it (due to
                the absence of it). However, as both __UID__ and
                __NAME__ are *<b>required</b>* attributes for a
                connectorObject (i.e., shadow account), then a later
                verification step failed the check and throws the
                exception.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt">The
                exception appears non-preemptive, i.e., it does create
                the shadow account, which name, I can later fill when
                the updateDelta is called. The exception trace would be
                more of a nuance than error. Yet, I think it would be
                nice that midpoint can do some auto remedy for it. For
                example, during the validation phase, copy the __uid__
                to __name__ if the latter is absent etc.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt">Or, if
                there might be some other way to get around this
                particular use case of mine, I would be glad to hear it.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt">Xiaoshu</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
            <div style="border:none;border-top:solid #B5C4DF
              1.0pt;padding:3.0pt 0in 0in 0in">
              <p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
                    style="font-size:12.0pt;color:black">From:
                  </span></b><span style="font-size:12.0pt;color:black">midPoint
                  <a href="mailto:midpoint-bounces@lists.evolveum.com"
                    moz-do-not-send="true">
                    <midpoint-bounces@lists.evolveum.com></a> on
                  behalf of Pavol Mederly via midPoint
                  <a href="mailto:midpoint@lists.evolveum.com"
                    moz-do-not-send="true"><midpoint@lists.evolveum.com></a><br>
                  <b>Date: </b>Wednesday, July 6, 2022 at 5:10 AM<br>
                  <b>To: </b><a
                    href="mailto:midpoint@lists.evolveum.com"
                    moz-do-not-send="true" class="moz-txt-link-freetext">midpoint@lists.evolveum.com</a>
                  <a href="mailto:midpoint@lists.evolveum.com"
                    moz-do-not-send="true"><midpoint@lists.evolveum.com></a><br>
                  <b>Cc: </b>Pavol Mederly <a
                    href="mailto:mederly@evolveum.com"
                    moz-do-not-send="true"><mederly@evolveum.com></a><br>
                  <b>Subject: </b>Re: [midPoint] Couldn't determine
                  shadow name</span><o:p></o:p></p>
            </div>
            <p>Hi Xiaoshu,<o:p></o:p></p>
            <p>I always recommend to have a look at the code that throws
              the exception. In your case it's most probably this one:<o:p></o:p></p>
            <p><a
href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FEvolveum%2Fmidpoint%2Fblob%2Fd317537626a99db32764c486507f1c1ac5a47fb6%2Finfra%2Fschema%2Fsrc%2Fmain%2Fjava%2Fcom%2Fevolveum%2Fmidpoint%2Fschema%2Futil%2FShadowUtil.java%23L688-L736&data=05%7C01%7C%7Cb358cbf8006f43e68b3208da6003f3e1%7C58b3d54f16c942d3af081fcabd095666%7C1%7C0%7C637927867354521446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Fr6TsXRVWm2o39d3qQjlMT288OTKrIcg6BsrBlp2hHs%3D&reserved=0"
                moz-do-not-send="true">https://github.com/Evolveum/midpoint/blob/d317537626a99db32764c486507f1c1ac5a47fb6/infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ShadowUtil.java#L688-L736</a><o:p></o:p></p>
            <p>(lines are shifted probably because of midPoint version
              mismatch)<o:p></o:p></p>
            <p>It should give you a clue - e.g. does your object have a
              primary identifier set? Etc...<o:p></o:p></p>
            <p>Regards,<o:p></o:p></p>
            <pre>-- <o:p></o:p></pre>
            <pre>Pavol Mederly<o:p></o:p></pre>
            <pre>Software developer<o:p></o:p></pre>
            <pre>evolveum.com<o:p></o:p></pre>
            <div>
              <p class="MsoNormal">On 23/06/2022 15:27, Wang, Xiaoshu
                via midPoint wrote:<o:p></o:p></p>
            </div>
            <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
              <p class="MsoNormal"><span style="font-size:16.0pt">Hi,</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt">I am
                  developing a custom connector. When I assign the
                  resource connected with that connector, I got the
                  following exception.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt">com.evolveum.midpoint.util.exception.SchemaException:
                  Could not determine shadow name.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt">         
                  at
com.evolveum.midpoint.schema.util.ShadowUtil.determineShadowStringName(ShadowUtil.java:695)</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt">         
                  at
com.evolveum.midpoint.schema.util.ShadowUtil.determineShadowName(ShadowUtil.java:667)</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt">         
                  ….</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt">The
                  exception seems not do anything “harmful” as far as I
                  can tell because the new account would be listed under
                  the resource. But I want to know why. Hope someone can
                  shed some light on for me.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="font-size:16.0pt">Xiaoshu</span><o:p></o:p></p>
              <p class="MsoNormal"><br>
                <br>
                <br>
                <br>
                <o:p></o:p></p>
              <pre>_______________________________________________<o:p></o:p></pre>
              <pre>midPoint mailing list<o:p></o:p></pre>
              <pre><a href="mailto:midPoint@lists.evolveum.com" moz-do-not-send="true" class="moz-txt-link-freetext">midPoint@lists.evolveum.com</a><o:p></o:p></pre>
              <pre><a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.evolveum.com%2Fmailman%2Flistinfo%2Fmidpoint&data=05%7C01%7C%7Cb358cbf8006f43e68b3208da6003f3e1%7C58b3d54f16c942d3af081fcabd095666%7C1%7C0%7C637927867354521446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gjSwuZNcrNj6DMmwFaXLgIw4GHXRsXHRFKJzAi%2FeKmo%3D&reserved=0" moz-do-not-send="true">https://lists.evolveum.com/mailman/listinfo/midpoint</a><o:p></o:p></pre>
            </blockquote>
            <p class="MsoNormal"><br>
              <br>
              <br>
              <o:p></o:p></p>
            <pre>_______________________________________________<o:p></o:p></pre>
            <pre>midPoint mailing list<o:p></o:p></pre>
            <pre><a href="mailto:midPoint@lists.evolveum.com" moz-do-not-send="true" class="moz-txt-link-freetext">midPoint@lists.evolveum.com</a><o:p></o:p></pre>
            <pre><a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.evolveum.com%2Fmailman%2Flistinfo%2Fmidpoint&data=05%7C01%7C%7Cb358cbf8006f43e68b3208da6003f3e1%7C58b3d54f16c942d3af081fcabd095666%7C1%7C0%7C637927867354521446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gjSwuZNcrNj6DMmwFaXLgIw4GHXRsXHRFKJzAi%2FeKmo%3D&reserved=0" moz-do-not-send="true">https://lists.evolveum.com/mailman/listinfo/midpoint</a><o:p></o:p></pre>
          </blockquote>
          <p class="MsoNormal"><br>
            <br>
            <o:p></o:p></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>midPoint mailing list<o:p></o:p></pre>
          <pre><a href="mailto:midPoint@lists.evolveum.com" moz-do-not-send="true" class="moz-txt-link-freetext">midPoint@lists.evolveum.com</a><o:p></o:p></pre>
          <pre><a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.evolveum.com%2Fmailman%2Flistinfo%2Fmidpoint&data=05%7C01%7C%7Cb358cbf8006f43e68b3208da6003f3e1%7C58b3d54f16c942d3af081fcabd095666%7C1%7C0%7C637927867354521446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gjSwuZNcrNj6DMmwFaXLgIw4GHXRsXHRFKJzAi%2FeKmo%3D&reserved=0" moz-do-not-send="true">https://lists.evolveum.com/mailman/listinfo/midpoint</a><o:p></o:p></pre>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>