Problems with AM Java API, AMOrganization.searchUsers()

Hi,

Following successful authentication, my application has a requirement to search for users based on modifyTimestamp attribute. It look like this:

AMOrganization org;

...

try

{

AMSearchControl sc = new AMSearchControl();

sc.setTimeOut(1200);

sc.setMaxResults(100);

AMSearchResults sr = org.searchUsers(sc, "(modifyTimestamp>=20070725120000Z)");

}

catch (Exception e)

{

System.out.println(e.getMessage());

}

So, if I have more than ~25000 users returned in search results, I get an com.iplanet.am.sdk.AMException with message "Search Failed". If serach function returned less than ~25000 users - it work fine.

Why sc.setMaxResults(100) does not work? Why AMOrganization.getUserDNs() throws AMException "Search Failed" too?

PS. I use Sun Java SystemAccess Manager 7 2005Q4 on Solaris.

[898 byte] By [Duke_kza] at [2007-11-27 11:40:48]
# 1

does a similar query from the command line give you more results? using the credentials that AM is using to bind with the DS, that is.

Ankush

ankushkapoora at 2007-7-29 17:34:03 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2

ldapsearch with similar query returns maximum 1000 users. It write "ldap_search:Sizelimit exceeded" in command line. Similary ldapserch option (-z quantity) does not work with quantity > 1000.

Where I can change this sizelimit?

Duke_kza at 2007-7-29 17:34:03 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3

> ldapsearch with similar query returns maximum 1000

> users. It write "ldap_search:Sizelimit exceeded" in

> command line. Similary ldapserch option (-z

> quantity) does not work with quantity > 1000.

> Where I can change this sizelimit?

I found that sizelimit is an user attribute. I change nsSizeLimit, nsLookThroughLimit, nsTimeLimit and ldapsearch now work correct and return all found entries.

But Access Manager Java API AMOrganization.searchUsers() behaviour does not change :(

Duke_kza at 2007-7-29 17:34:03 > top of Java-index,Web & Directory Servers,Directory Servers...
# 4

Maximum search results to return is configurable in the directory server's admin console - configuration tab.

Ankush

ankushkapoora at 2007-7-29 17:34:03 > top of Java-index,Web & Directory Servers,Directory Servers...