<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.StylE-mailovZprvy17
        {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;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang="CS" link="#0563C1" vlink="#954F72"><div class="WordSection1"><p class="MsoNormal">Hi guys,</p><p class="MsoNormal">I am using midPoint 3.7 support and l am looking into NPE connected with prismContext and I am a little bit getting frustrated since I have no idea how to find root cause.</p><p class="MsoNormal"> </p><p class="MsoNormal">This NPE occurs when computing authorizations for Org tree.</p><p class="MsoNormal">I have an authorization (for deleting subunits):</p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f;background:silver">authorization</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">       </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">name</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><u><span style="font-size:10.0pt;font-family:Consolas;color:black">org</span></u><span style="font-size:10.0pt;font-family:Consolas;color:black">-delete-subunit</span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">name</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">       </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">action</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas;color:black"><a href="http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#delete">http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#delete</a></span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">action</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">       </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">object</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">             </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">type</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas;color:black">OrgType</span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">type</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">             </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">orgRelation</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">                    </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">subjectRelation</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas;color:black">org:manager</span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">subjectRelation</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">                    </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">scope</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas;color:black">allDescendants</span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">scope</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">                    </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">includeReferenceOrg</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas;color:black">true</span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">includeReferenceOrg</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">             </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">orgRelation</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">             </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">filter</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">                    </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">q:equal</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">                           </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">q:path</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas;color:black">orgType</span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">q:path</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">                           </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"><</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">q:value</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas;color:black">ROLE_FOLDER</span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">q:value</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">                    </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">q:equal</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">             </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">filter</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">       </span><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f">object</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span><span style="font-size:10.0pt;font-family:Consolas"></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:teal"></</span><span style="font-size:10.0pt;font-family:Consolas;color:#3f7f7f;background:silver">authorization</span><span style="font-size:10.0pt;font-family:Consolas;color:teal">></span></p><p class="MsoNormal"> </p><p class="MsoNormal">When I click into Org. structure and then I click on any item in a tree (including root org) authorizations will be computed.</p><p class="MsoNormal">But when it gets to computing root org object. It invokes object.getPrismContext() which is null resulting in Error 500: <i>org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [ListView [Component id = menuItem]]</i></p><p class="MsoNormal"> </p><p class="MsoNormal">When I try to click (compute) it for the second time it is OK. But then it occures sometimes again (especially when I log out and log in, but it depends – sometimes it is just on the 10th attempt, sometimes on the 2nd attempt) </p><p class="MsoNormal"> </p><p class="MsoNormal">I noticed that in com.evolveum.midpoint.prism.Item is mentioned: „beware, this one can easily be null“, but in QueryJaxbConvertor it is not checked for null…</p><p class="MsoNormal"> </p><p class="MsoNormal">Is there any way how to make sure that there always be prismContext for a root org? Or what else should I check?</p><p class="MsoNormal"> </p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">Jan Vaňáček</span></b><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black"><br>JAVA programátor<br><br>gsm: [+420] 734 510 214<br>e-mail: <a href="mailto:jan.vanacek@ami.cz" target="_blank"><span style="color:blue">jan.vanacek@ami.cz</span></a></span></p><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="500" style="width:375.0pt;border-collapse:collapse"><tr><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black;border:none windowtext 1.0pt;padding:0cm">AMI Praha a.s.</span></b><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black"><br>Pláničkova 11, 162 00 Praha 6</span></p></td></tr><tr style="height:9.5pt"><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm;height:9.5pt"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black"> </span></p></td></tr><tr><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black">tel.: [+420] 274 783 239 | web: <a href="http://www.ami.cz/"><span style="color:#0066cc;border:none windowtext 1.0pt;padding:0cm">www.ami.cz</span></a></span></p></td></tr><tr style="height:9.5pt"><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm;height:9.5pt"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black"> </span></p></td></tr><tr><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black"><img border="0" width="104" height="40" style="width:1.0833in;height:.4166in" id="Obrázek_x0020_5" src="cid:image001.gif@01D58040.2C93BE80" alt="AMI Praha a.s."></span></p></td></tr><tr style="height:9.5pt"><td width="500" valign="bottom" style="width:375.0pt;padding:0cm 0cm 0cm 0cm;height:9.5pt"><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:black"> </span></p></td></tr></table><p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:#aaaaaa">Textem tohoto e‑mailu podepisující neslibuje uzavřít ani neuzavírá za společnost AMI Praha a.s.</span><span style="mso-fareast-language:CS"><br></span><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:#aaaaaa">jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně písemnou formu.</span><span style="mso-fareast-language:CS"><br></span><span style="font-size:4.0pt;font-family:"Arial",sans-serif"> </span><span style="font-size:8.5pt;font-family:"Arial",sans-serif;color:#aaaaaa"><br>Tento e‑mail je určen výhradně pro potřeby jeho adresáta/ů a může obsahovat důvěrné nebo osobní<br>informace. Nejste‑li zamýšleným příjemcem, je zakázáno jakékoliv zveřejňování, zprostředkování<br>nebo jiné použití těchto informací. Pokud jste obdrželi e‑mail neoprávněně, informujte o tom prosím<br>odesílatele a vymažte neprodleně všechny kopie tohoto e‑mailu včetně všech jeho příloh. Nakládáním<br>s neoprávněně získanými informacemi se vystavujete riziku právního postihu.</span><span style="mso-fareast-language:CS"></span></p><p class="MsoNormal"> </p></div></body></html>