<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello Hsin-Fang,</p>
<p>there is a troubleshooting piece of code related to that
exception:</p>
<p><a moz-do-not-send="true"
href="https://github.com/Evolveum/midpoint/blob/5e841416523a6d46431443d36b056e91ada0b9f1/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ShadowAcquisition.java#L188-L196"
class="moz-txt-link-freetext">https://github.com/Evolveum/midpoint/blob/5e841416523a6d46431443d36b056e91ada0b9f1/provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/ShadowAcquisition.java#L188-L196</a></p>
<p>You should enable the respective DEBUG logging and midPoint will
provide you with more information.</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 03/08/2022 10:53, Hsin-Fang Hsu via
midPoint wrote:<br>
</div>
<blockquote type="cite"
cite="mid:GV0P278MB067273ACD59525108B26C14DAE9C9@GV0P278MB0672.CHEP278.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:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I upgraded midpoint from
4.4.1 (postgresql) to 4.4.2 (postgresql native).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The data was exported
and imported into the database using ninja and the content
in the new database also seems to be fine.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ADLdapConnector v3.3 is
used.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">AD test connection
works. But when I tried to access any AD account, I got
these kind of errors:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">com.evolveum.midpoint.util.exception.SystemException:
Unexpected repository behavior: object already exists error
even after we double-checked shadow uniqueness: Conflicting
object already exists, constraint violation message: ERROR:
duplicate key value violates unique constraint
"m_shadow_primidval_objcls_resrefoid_key" Detail: Key
(primaryidentifiervalue, objectclassid,
resourcereftargetoid)=(bc1cd126-81dc-4c2a-acd0-b30eafdc40ef,
11, 412a9b5d-4c88-4a64-a281-2995d46146c8) already exists. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Error resolving object
with oid 'eb303210-59dd-499f-bbca-9c57cefa3295': Unexpected
repository behavior: object already exists error even after
we double-checked shadow uniqueness: Conflicting object
already exists, constraint violation message: ERROR:
duplicate key value violates unique constraint
"m_shadow_primidval_objcls_resrefoid_key" Detail: Key
(primaryidentifiervalue, objectclassid,
resourcereftargetoid)=(b035b94c-e127-466a-9011-1e4a2dc41fc5,
17, 412a9b5d-4c88-4a64-a281-2995d46146c8) already exists.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I guess the error occurs
because midpoint try to save what it reads from AD to a new
shadow but that shadow already exists in the database. But
the configuration works fine in 4.4.1. How can I solve this?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you very much for
your help in advance!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hsin-Fang<o:p></o:p></span></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</body>
</html>