<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; font-size: 12px; min-height: 14px;">        ... 12 common frames omitted                                                                  </div><div style="white-space: nowrap; color: rgb(85, 87, 83); font-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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-family: "DejaVu Sans Mono", "Liberation Mono", monospace; 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></body></html>