Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 47706 invoked from network); 7 Aug 2005 20:24:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Aug 2005 20:24:44 -0000 Received: (qmail 47058 invoked by uid 500); 7 Aug 2005 20:24:42 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 46777 invoked by uid 500); 7 Aug 2005 20:24:41 -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 46603 invoked by uid 99); 7 Aug 2005 20:24:40 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Aug 2005 13:24:38 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id BC1DDE8 for ; Sun, 7 Aug 2005 22:24:37 +0200 (CEST) Message-ID: <1072216317.1123446277769.JavaMail.jira@ajax.apache.org> Date: Sun, 7 Aug 2005 22:24:37 +0200 (CEST) From: "Alex Karasulu (JIRA)" To: dev@directory.apache.org Subject: [jira] Updated: (DIREVE-215) Wrong error messages for some operations In-Reply-To: <1295620303.1123440395785.JavaMail.jira@ajax.apache.org> 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/DIREVE-215?page=all ] Alex Karasulu updated DIREVE-215: --------------------------------- Fix Version: 0.9.2 > Wrong error messages for some operations > ---------------------------------------- > > Key: DIREVE-215 > URL: http://issues.apache.org/jira/browse/DIREVE-215 > Project: Directory Server > Type: Bug > Components: protocol > Versions: 0.9.1 > Reporter: Stefan Zoerner > Assignee: Alex Karasulu > Priority: Minor > Fix For: 0.9.2 > Attachments: DeleteHandler.java > > If a client tries to remove an entry, and the deletion fails because the entry is not a leaf (error code 66), the LDAP message is wrong. > Status code and Exception type within the server are correct (as detected by the corresponding test case). But the message text itself contains the words "failed to add entry". This information is sent to the client, which may display it, e.g. > * JNDI includes it during creation of appropriate Exception (com.sun.jndi.ldap.LdapCtx.mapErrorCode(66, "failed to add entry ..."). > * Command line tools like ldapmodify display it on the console. > Example: If the following LDIF is applied to ApacheDS > --- > # create entry > dn: ou=noLeaf,ou=system > changetype: add > ou: noLeaf > objectclass: top > objectclass: organizationalUnit > # create entry below the first > dn: ou=leaf,ou=noLeaf,ou=system > changetype: add > ou: leaf > objectclass: top > objectclass: organizationalUnit > # delete subtree > dn: ou=noLeaf,ou=system > changetype: delete > --- > it goes > $ ldapmodify -h magritte -p 10389 -D uid=admin,ou=system -w **** -f deleteSubtree.ldif > adding new entry ou=noLeaf,ou=system > adding new entry ou=leaf,ou=noLeaf,ou=system > deleting entry ou=noLeaf,ou=system > ldap_delete: Operation not allowed on nonleaf > ldap_delete: additional info: failed to add entry ou=noLeaf,ou=system: > ... (very long Stack trace deleted) ... > $ > I modified the error message within class org.apache.ldap.server.protocol.DeleteHandler to "failed to delete entry ..." (attached), although I would prefer a more detailed message (like "Not Allowed On Non-leaf", as Sun Directory does). But this is not possible at that general place without an ugly switch or so. > The same "defect" (probably a cut/copy/paste of error message from AddHandler) is present in CompareHandler, ModifyDnHandler, and ModifyHandler. > I would also suggest not to send the complete stack trace back to the client. I have removed it in the attached version of the DeleteHandler and had a better command line experience with ApacheDS (the stack traces should go in a server log only from my point of view). This applies to other handlers (e.g. Add) as well. -- 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