<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><div data-test-id="message-view-body"><div class="ydpee51d8dmsg-body ydpee51d8dP_wpofO ydpee51d8diy_A" data-test-id="message-view-body-content"><div class="ydpee51d8djb_0 ydpee51d8dX_6MGW ydpee51d8dN_6Fd5"><div id="ydpee51d8dyiv1505051541"><div>Hello All,</div><div><br></div><div>What causes the above exception and how to fix it? I see this exception very frequent (not always) when i try to obtain shadow object with a given Key of value of the resource object from my java class. The following is the stack trace:<br><br><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">com.evolveum.midpoint.util.exception.SystemException: More than one items matching {http://</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">midpoint.evolveum.com/xml/ns/public/common/common-3}object in container authorization </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.prism.xjc.PrismForJAXBUtil.getContainer(PrismForJAXBUtil.java:202) ~[</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">prism-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.xml.ns._public.common.common_3.AuthorizationType.getObject(Authorizat</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">ionType.java:172) ~[schema-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.security.api.Authorization.getObject(Authorization.java:83) ~[securit</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">y-api-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.security.impl.SecurityEnforcerImpl.preProcessObjectFilterInternal(Sec</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">urityEnforcerImpl.java:866) ~[security-impl-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.security.impl.SecurityEnforcerImpl.preProcessObjectFilter(SecurityEnf</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">orcerImpl.java:817) ~[security-impl-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.model.impl.controller.ModelController.preProcessQuerySecurity(ModelCo</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">ntroller.java:1824) ~[model-impl-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.model.impl.controller.ModelController.searchObjects(ModelController.j</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">ava:796) ~[model-impl-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> ... 12 common frames omitted </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">Caused by: com.evolveum.midpoint.util.exception.SchemaException: More than one items matching {http://</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">midpoint.evolveum.com/xml/ns/public/common/common-3}object in container authorization </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.prism.PrismContainerValue.findItemByQName(PrismContainerValue.java:69</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">1) ~[prism-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.prism.PrismContainerValue.findCreateItem(PrismContainerValue.java:597</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">) ~[prism-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.prism.PrismContainerValue.findOrCreateContainer(PrismContainerValue.j</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">ava:740) ~[prism-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> at com.evolveum.midpoint.prism.xjc.PrismForJAXBUtil.getContainer(PrismForJAXBUtil.java:200) ~[</div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;">prism-3.5.0-SNAPSHOT.jar:na] </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-size: 12px; min-height: 14px;"> ... 19 common frames omitted</div><br></div><div>Is there an example of getting shadow object using java with the resource oid and the account object's key value in hand?</div><div><br></div><div>Thanks,</div><div>Prabhakar</div></div></div></div><div class="ydpee51d8djb_0 ydpee51d8dX_6MGW ydpee51d8dN_6Fd5"></div></div><div class="ydpee51d8dH_7jIs ydpee51d8dD_F ydpee51d8dab_C ydpee51d8dQ_69H5 ydpee51d8dE_36RhU" data-test-id="toolbar-hover-area"><div class="ydpee51d8dD_F ydpee51d8dW_6D6F ydpee51d8dr_BN ydpee51d8dgl_C" data-test-id="card-toolbar" style="width: 680.359px;"></div></div><br></div></div></body></html>