Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 40840 invoked from network); 15 Apr 2006 08:06:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Apr 2006 08:06:57 -0000 Received: (qmail 45874 invoked by uid 500); 15 Apr 2006 08:06:56 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 45647 invoked by uid 500); 15 Apr 2006 08:06:55 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 45636 invoked by uid 99); 15 Apr 2006 08:06:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Apr 2006 01:06:55 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Apr 2006 01:06:54 -0700 Received: from brutus (localhost.localdomain [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8E40A71429D for ; Sat, 15 Apr 2006 08:06:00 +0000 (GMT) Message-ID: <72336670.1145088360554.JavaMail.jira@brutus> Date: Sat, 15 Apr 2006 08:06:00 +0000 (GMT+00:00) From: "Stefan Zoerner (JIRA)" To: dev@directory.apache.org Subject: [jira] Assigned: (DIRSERVER-601) Incorrect results using Context lookup In-Reply-To: <49690505.1142931670176.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIRSERVER-601?page=all ] Stefan Zoerner reassigned DIRSERVER-601: ---------------------------------------- Assign To: Stefan Zoerner > Incorrect results using Context lookup > -------------------------------------- > > Key: DIRSERVER-601 > URL: http://issues.apache.org/jira/browse/DIRSERVER-601 > Project: Directory ApacheDS > Type: Bug > Versions: 1.0-RC1 > Environment: Windows - JDK 1.4.2_07 > Reporter: Simon Temple > Assignee: Stefan Zoerner > > The attached code demonstrates how a lookup using an invalid name (The VERY-BROKEN segment should be obvious) returns a result > instead of throwing an exception: > import java.util.Hashtable; > import javax.naming.Context; > import javax.naming.NameClassPair; > import javax.naming.NamingEnumeration; > import javax.naming.NamingException; > import javax.naming.directory.DirContext; > import javax.naming.directory.InitialDirContext; > class LDAPTest > { > public static void main(String[] args) > { > // Identify service provider to use > Hashtable env = new Hashtable(11); > env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); > env.put(Context.PROVIDER_URL, "ldap://localhost:10389/"); > env.put(Context.SECURITY_AUTHENTICATION, "simple"); > env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system"); > env.put(Context.SECURITY_CREDENTIALS, "secret"); > try > { > // Create the initial directory context > DirContext ctx = new InitialDirContext(env); > DirContext ctx2 = (DirContext)ctx.lookup("ou=loadedLdifFiles,VERY-BROKEN=configuration,ou=system"); > NamingEnumeration ne = ctx2.list(""); > while (ne.hasMoreElements()) > { > NameClassPair pair = (NameClassPair)ne.nextElement(); > System.out.println("pair: "+pair.getName()+" == "+pair.getClassName()); > } > > ctx2.close(); > ctx.close(); > } > catch (NamingException e) > { > System.err.println("Exception: " + e); > e.printStackTrace(); > } > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira