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);
            // 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(
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(
    at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext (
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext( :236)
    at binds.BindAlias.main(

A word about the code.
If I replace "alias" with another objectClass- say "top"  the code runs without errors.


On 9/30/06, Stefan Zoerner (JIRA) <> wrote:
    [ ]

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:
>             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:
For more information on JIRA, see: