Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 86929 invoked from network); 1 Oct 2006 16:55:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Oct 2006 16:55:29 -0000 Received: (qmail 31687 invoked by uid 500); 1 Oct 2006 16:55:29 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 31454 invoked by uid 500); 1 Oct 2006 16:55:28 -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 31443 invoked by uid 99); 1 Oct 2006 16:55:28 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Oct 2006 09:55:28 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [81.169.145.170] ([81.169.145.170:34501] helo=natlemon.rzone.de) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 3E/10-05102-EF2FF154 for ; Sun, 01 Oct 2006 09:55:27 -0700 Received: from [127.0.0.1] (p548FFC33.dip.t-dialin.net [84.143.252.51]) (authenticated bits=0) by post.webmailer.de (8.13.6/8.13.6) with ESMTP id k91GtIZF013631 for ; Sun, 1 Oct 2006 18:55:23 +0200 (MEST) Message-ID: <451FF2FE.20900@apache.org> Date: Sun, 01 Oct 2006 18:55:26 +0200 From: Stefan Zoerner User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: [jira] Commented: (DIRSERVER-752) Alias Problem References: <26298937.1159548679572.JavaMail.root@brutus> <11269254.1159616000776.JavaMail.root@brutus> <82ffc5450610010824u3298d58cg2da9b06d7a139bd5@mail.gmail.com> In-Reply-To: <82ffc5450610010824u3298d58cg2da9b06d7a139bd5@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks. I can reproduce an error with your example code, at least with ApacheDS 1.0 RC4. It causes a ClassCastException in the interceptor chain. Currently I write a JUnit test in order to re-check with the current 1.0 snapshot. Stay tuned. Greetings, Stefan ---8<--- Stefan Zoerner (szoerner@apache.org) Apache Directory Project Committer :: PMC Member Mbah Tenjoh-Okwen wrote: > Thanks > here is the relevant part of the code: > > //create context > DirContext ctx=new InitialDirContext(properties); > > //create entry attributes > Attributes attrs= new BasicAttributes(true); > Attribute attr= new BasicAttribute("objectClass", "alias"); > Attribute attr1= new BasicAttribute("aliasedObjectName", > "ou=favorite,ou=Fruits,ou=system"); > attrs.put (attr); > attrs.put(attr1); > > > // create the string to contain rdns > String rdns ="ou=bestFruit,ou=Fruits"; > > //create the subentry > ctx.createSubcontext(rdns, attrs); > > > Here is the stack trace I got: > > javax.naming.NamingException: [LDAP: error code 80 - failed to add entry > ou=bestFruittt,ou=Fruits,ou=system: Unexpected exception.]; remaining > name 'ou=bestFruittt,ou=Fruits' > at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3029) > at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931) > at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737) > at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:770) > at > com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDirContext.java:319) > at > com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext > (PartialCompositeDirContext.java:248) > at > com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java > :236) > at > javax.naming.directory.InitialDirContext.createSubcontext(InitialDirContext.java:178) > at binds.BindAlias.main(BindAlias.java:45) > > A word about the code. > If I replace "alias" with another objectClass- say "top" the code runs > without errors. > > > thanks > > > On 9/30/06, *Stefan Zoerner (JIRA)* > wrote: > > [ > http://issues.apache.org/jira/browse/DIRSERVER-752?page=comments#action_12438885 > ] > > Stefan Zoerner commented on DIRSERVER-752: > ------------------------------------------ > > The information the reporter provieded is not sufficient to help. At > least a JNDI source code fragment is needed (what exactly has been > tried to create an alias), and a stack trace would be helpful as well. > > ApacheDS does support alias entries, btw. > > > Alias Problem > > ------------- > > > > Key: DIRSERVER-752 > > URL: > http://issues.apache.org/jira/browse/DIRSERVER-752 > > Project: Directory ApacheDS > > Issue Type: Bug > > Environment: windows XP > > Reporter: mbah tenjoh-okwen > > > > hello > > I would like to know if apacheDS supports aliasing and if so > what do I need to do in other to add a > > sub context of object class type "alias". Each time I try to > add one I get an error report. I use JNDI and so the error i get is > of type javax.naming.NamingException . > > I will appreciate your help > > thanks > > -- > 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 > > > > --