<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#073763">Hi guys, we made some more test and we found that it is an issue of older versions of MP. It is failing on MP 3.7.1 but it works on MP 3.9. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#073763"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#073763">Is there any documented issue related to this behavior ?</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font face="arial, helvetica, sans-serif"><br></font></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><br><br><font color="#444444">Ing Nicolás Rossi</font><br><font color="#999999">Identicum S.A.</font><br><font color="#999999">Jorge Newbery 3226</font><br><font color="#999999">Oficina: +54 (11) 4552-3050</font></font></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><font color="#999999">Móvil: +54 (911) 6041-3920<br><a href="http://www.identicum.com" target="_blank">www.identicum.com</a></font></font><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 29, 2019 at 12:59 PM Nicolas Rossi <<a href="mailto:nrossi@identicum.com">nrossi@identicum.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">Hi guys, we are facing an issue with a Manual Resource when updating a resource attribute if it wasn't present when the shadow was created. Let me share some context:</div><div class="gmail_default"><ul style="color:rgb(7,55,99);font-family:arial,helvetica,sans-serif;font-size:small"><li>The manual resource defines an attribute on the schema:</li></ul></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><font face="courier new, monospace"><b><xsd:element minOccurs="0" name="organizationalUnit" type="xsd:string"/></b></font></div></blockquote><div class="gmail_default"><ul style="color:rgb(7,55,99);font-family:arial,helvetica,sans-serif;font-size:small"><li>There is a mapping on the resource for this attribute:</li></ul></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default"><div><font face="courier new, monospace"><b><attribute id="9"></b></font></div></div><div class="gmail_default"><div><font face="courier new, monospace"><b> <c:ref>ri:organizationalUnit</c:ref></b></font></div></div><div class="gmail_default"><div><font face="courier new, monospace"><b> <outbound></b></font></div></div><div class="gmail_default"><div><font face="courier new, monospace"><b> <source></b></font></div></div><div class="gmail_default"><div><font face="courier new, monospace"><b> <c:path>$user/organizationalUnit</c:path></b></font></div></div><div class="gmail_default"><div><font face="courier new, monospace"><b> </source></b></font></div></div><div class="gmail_default"><div><font face="courier new, monospace"><b> </outbound></b></font></div></div><div class="gmail_default"><div><font face="courier new, monospace"><b></attribute></b></font></div></div></blockquote><div><div dir="ltr" class="gmail-m_-8650729599482834129gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><ul><li><font face="arial, helvetica, sans-serif"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">If the user receiving the resource has no value on the attribute then the shadow is created without this attribute (element <ri:organizationalUnit> is missing):</span></font></li></ul></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b><attributes></b></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)"> </span><ri:username>a.santos</ri:username></b></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)"> </span><ri:emailAddress>a.santos@<span class="gmail_default" style="font-size:small;color:rgb(7,55,99)">xxxx</span>.com</ri:emailAddress></b></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div class="gmail_default" style="font-size:small;color:rgb(7,55,99)"><font face="courier new, monospace"><b> .....</b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b></attributes></b></font></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><div dir="ltr" class="gmail-m_-8650729599482834129gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><ul><li><font face="arial, helvetica, sans-serif"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">Then the user set a new value for the organizationalUnit attribute, it enters as a Delta:</span><br></font></li></ul></div></div></div></div></div></div></div></div></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <pendingOperation id="33"></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <delta></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <t:changeType>modify</t:changeType></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <t:objectType>c:ShadowType</t:objectType></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <t:oid>8ff9d322-658b-40ce-9ad5-533eeca0d96a</t:oid></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <t:itemDelta></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <t:modificationType>replace</t:modificationType></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <font color="#ff0000"> <t:path>c:attributes/ri:organizationalUnit</t:path></font></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> <t:value xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>"</b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"</b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> xsi:type="xsd:string">Development</t:value></b></font></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><font face="courier new, monospace"><b> </t:itemDelta></b></font></div></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><div dir="ltr" class="gmail-m_-8650729599482834129gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><ul><li><font color="#073763" face="arial, helvetica, sans-serif"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">And the operation fails with the error "</span>ShadowRefresh of object shadow:8ff9d322-658b-40ce-9ad5-533eeca0d96a(felipe.<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">xxxx</span>) shadow refresh task failed: No definition for item {<a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3%7DorganizationalUnit" target="_blank">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}organizationalUnit</a> in PC({<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3%7Dattributes" target="_blank">http://midpoint.evolveum.com/xml/ns/public/common/common-3}attributes</a>)<span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">".</span></font></li></ul></div></div></div></div></div></div></div></div></div></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div>at com.evolveum.midpoint.prism.PrismContainerValue.createDetachedNewItemInternal(PrismContainerValue.java:779)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.prism.PrismContainerValue.createSubItem(PrismContainerValue.java:767)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.prism.PrismContainerValue.findCreateItem(PrismContainerValue.java:727)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.prism.PrismContainer.findCreateItem(PrismContainer.java:495)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.prism.PrismContainerValue.findCreateItem(PrismContainerValue.java:706)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.prism.PrismContainer.findCreateItem(PrismContainer.java:495)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.prism.PrismContainer.findOrCreateItem(PrismContainer.java:579)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.prism.delta.ItemDelta.applyTo(ItemDelta.java:1327)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.prism.delta.ItemDelta.applyTo(ItemDelta.java:1289)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.modifyObjectAttempt(ObjectUpdater.java:405)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.modifyObject(SqlRepositoryServiceImpl.java:571)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.cache.RepositoryCache.modifyObject(RepositoryCache.java:291)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.cache.RepositoryCache.modifyObject(RepositoryCache.java:267)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.cache.RepositoryCache.modifyObject(RepositoryCache.java:260)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.provisioning.impl.ShadowManager.modifyShadowAttributes(ShadowManager.java:1438)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.provisioning.impl.ShadowCache.refreshShadow(ShadowCache.java:1229)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.refreshShadow(ProvisioningServiceImpl.java:872)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.model.impl.cleanup.ShadowRefreshTaskHandler$1.handleObject(ShadowRefreshTaskHandler.java:108)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.common.task.AbstractSearchIterativeResultHandler.processRequest(AbstractSearchIterativeResultHandler.java:325)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.common.task.AbstractSearchIterativeResultHandler.handle(AbstractSearchIterativeResultHandler.java:183)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.cache.RepositoryCache$1.handle(RepositoryCache.java:227)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.sql.helpers.ObjectRetriever.searchObjectsIterativeByPaging(ObjectRetriever.java:755)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.searchObjectsIterative(SqlRepositoryServiceImpl.java:838)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.cache.RepositoryCache.searchObjectsIterative(RepositoryCache.java:230)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.repo.common.task.AbstractSearchIterativeTaskHandler.run(AbstractSearchIterativeTaskHandler.java:292)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeHandler(JobExecutor.java:639)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.executeRecurrentTask(JobExecutor.java:522)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at com.evolveum.midpoint.task.quartzimpl.execution.JobExecutor.execute(JobExecutor.java:180)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at org.quartz.core.JobRunShell.run(JobRunShell.java:202)</div></div></div></div></div></div></div></div></div></div></div></div></div><div><div class="gmail-m_-8650729599482834129gmail_signature"><div><div><div><div><div><div><div><div><div><div><div> at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:588)</div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote><div><div dir="ltr" class="gmail-m_-8650729599482834129gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font color="#073763" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#073763" face="arial, helvetica, sans-serif"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">Looking <a href="https://github.com/Evolveum/midpoint/blob/90e4b7adc44f6d97629b8e71d1af2c714ac7e593/infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/PrismContainerValueImpl.java#L792" target="_blank">here</a> i</span><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">t seems that it cannot find the attribute definition on the resource. </span></font></div><div><font color="#073763" face="arial, helvetica, sans-serif"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)"><br></span></font></div><div><font color="#073763" face="arial, helvetica, sans-serif"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(7,55,99)">Any thoughts ?</span></font></div><font face="arial, helvetica, sans-serif"><div dir="ltr"><font face="arial, helvetica, sans-serif"><br></font></div><br><font color="#444444">Ing Nicolás Rossi</font><br><font color="#999999">Identicum S.A.</font><br><font color="#999999">Jorge Newbery 3226</font><br><font color="#999999">Oficina: +54 (11) 4552-3050</font></font></div><div dir="ltr"><font face="arial, helvetica, sans-serif"><font color="#999999">Móvil: +54 (911) 6041-3920<br><a href="http://www.identicum.com" target="_blank">www.identicum.com</a></font></font><br></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>