Find the answer to your Linux question:
Results 1 to 2 of 2
I'm performing searches on Directory Server using java and JNDI. I'm trying to use server-side sorting as described in RFC 2891. JNDI supports this through the SortControls class, eg: Code: ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    2

    Directory Server - RFC 2891 Server Side Sorting

    I'm performing searches on Directory Server using java and JNDI. I'm trying to use server-side sorting as described in RFC 2891. JNDI supports this through the SortControls class, eg:

    Code:
    final SortControl reqControls = new SortControl("cn", Control.CRITICAL);        
    final LdapContext initCtx = new InitialLdapContext(env, new Control[]{reqControls});
    I'm finding that the second line here causes an exception:

    Code:
    javax.naming.OperationNotSupportedException: [LDAP: error code 12 - Unavailable Critical Extension]
    And in the server's access log I get this:

    Code:
    [26/Jan/2009:11:31:51 +0000] conn=44 op=0 BIND dn="cn=Directory Manager" method=128 version=3, failed to parse LDAP controls
    [26/Jan/2009:11:31:51 +0000] conn=44 op=0 RESULT err=12 tag=97 nentries=0 etime=0
    My question is, do I need to configure a particular extension, or does Directory Server simply not support RFC 2891?

  2. #2
    Just Joined!
    Join Date
    Jan 2009
    Posts
    2
    After further investigation, I have found that the SortControl only works when used in conjunction with the VirtualListViewControl (part of Sun's JNDI booster pack, not in core JDK). I can find nothing in the FedoraDS documentation that says they have to be used together, but I thought this might be useful info to someone hitting the same problem as me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...