users@glassfish.java.net

JNDI Error:

From: <glassfish_at_javadesktop.org>
Date: Fri, 20 Nov 2009 13:35:38 PST

Hi,
   I'm using JNDI to search a directory; the server configurations is such that only 2 controls are enabled:
2.16.840.1.113730.3.4.9
1.2.840.1.113556.1.4.473

When I run the code, I get this error message:

[b]javax.naming.OperationNotSupportedException: [LDAP: error code 12 - The server is not configured to pass through control 2.16.840.1.113730.3.4.2];[/b]

here is my code:
        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
        env.put(Context.REFERRAL, "ignore");
        env.put(Context.PROVIDER_URL, "ldap://ldap.uuuuu.edu:389");
        
        try{
                ctx = new javax.naming.directory.InitialDirContext(env);
                matchAttrs = new BasicAttributes(true);
                matchAttrs.put(new BasicAttribute("uid"));
        // Search for objects with those matching attributes
                NamingEnumeration answer = ctx.search("o=uuuuu,c=us", matchAttrs);
                System.out.println("CTX Searched...");
                formatResults(answer);
        }catch(NamingException ne){
                ne.printStackTrace();
        }
        catch(Exception E){
                E.printStackTrace();
        }

  When I search another directory, the same code returns data, however having issues with this particular server only. What am I missing? Please suggest.

thanks & regards,
NK
[Message sent by forum member 'khann4' ]

http://forums.java.net/jive/thread.jspa?messageID=372724