[midPoint] strange filter error

Rainer Herbst rainer.herbst at aip.de
Thu Feb 11 15:37:00 CET 2021


Dear all,

the last hours I tried to resolve a somewhat tricky problem.

I want to filter all users that have shadows in a specific ressource and the 
validTo date is more than 3 years in the past. The following qery works well 
in the query playground:
<query>
<filter>
   <and>
   <ref>
   <path>linkRef/@/resourceRef</path>
   <value oid="ecd0bf7b-7e80-4175-ba5e-4fd5de2ecd75"/>
   </ref>
   <less>
   <path>activation/validTo</path>
  <expression>
<script>
<code>
import java.util.*;
import javax.xml.datatype.XMLGregorianCalendar
import com.evolveum.midpoint.xml.ns._public.common.common_3.*
import com.evolveum.midpoint.prism.xml.XmlTypeConverter
import javax.xml.datatype.DatatypeFactory;
import java.text.SimpleDateFormat;

GregorianCalendar gregCal;
XMLGregorianCalendar xmlGregCal;

gregCal = new GregorianCalendar();
gregCal.add(Calendar.YEAR,-3);
result = DatatypeFactory.newInstance().newXMLGregorianCalendar(gregCal);
return result;
</code>
</script>
   </expression>
   </less>

   </and>
</filter>
</query>

But when I use the same filter in the user page, I get an error "Could not 
count objects", s. attachement.

What do I miss?


Viele Grüße,

Rainer Herbst
Leiter IT-Service
Phone: +49 331 7499-257
e-mail: rainer.herbst at aip.de
https://www.aip.de

-----------------------------------------------------------------------------------------------
Leibniz-Institut für Astrophysik Potsdam (AIP)
An der Sternwarte 16, 14482 Potsdam

Vorstand: Prof. Dr. Matthias Steinmetz, Matthias Winker
Stiftung bürgerlichen Rechts
Stiftungsverzeichnis Brandenburg: 26 742-00/7026
-----------------------------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2021-02-11 um  15.29.51 1.png
Type: image/png
Size: 284229 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20210211/bedfa487/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3646 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20210211/bedfa487/attachment-0001.bin>


More information about the midPoint mailing list