You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Mbah Tenjoh-Okwen <te...@googlemail.com> on 2006/10/01 17:24:03 UTC

Re: [jira] Commented: (DIRSERVER-752) Alias Problem

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) <ji...@apache.org> 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
>
>
>

Re: [jira] Commented: (DIRSERVER-752) Alias Problem

Posted by Mbah Tenjoh-Okwen <te...@googlemail.com>.
Thanks Stefan,
I will give you a feedback once I get things run on my system.



On 10/1/06, Stefan Zoerner <sz...@apache.org> wrote:
>
> Mbah, please take the JUnit test I have just filed at JIRA
>
> https://issues.apache.org/jira/browse/DIRSERVER-752
>
> as a blueprint for further bug reports. It helps us a lot if the
> problematic operations are wrapped like this.
>
> I hope the error the test case produces (method testAddAliasInContainer
> to be more concrete) is the same you face in your environment. How about
> downloading it and trying it out?
>
> Greetings from Hamburg,
>      Stefan
>
>
> Alex Karasulu wrote:
> > Mbah,
> >
> > Thanks to Stefan we'll fix this issue fast.  However you should be the
> > one writing this unit test case instead of him.  Next time please look
> > into doing this yourself if you want a faster response.
> >
> > Alex
> >
> >
> > Mbah Tenjoh-Okwen wrote:
> >> Thanks. I will be on the alert to see what you come up with.
> >>
> >>
>
>

Re: [jira] Commented: (DIRSERVER-752) Alias Problem

Posted by Stefan Zoerner <sz...@apache.org>.
Mbah, please take the JUnit test I have just filed at JIRA

https://issues.apache.org/jira/browse/DIRSERVER-752

as a blueprint for further bug reports. It helps us a lot if the 
problematic operations are wrapped like this.

I hope the error the test case produces (method testAddAliasInContainer 
to be more concrete) is the same you face in your environment. How about 
downloading it and trying it out?

Greetings from Hamburg,
     Stefan


Alex Karasulu wrote:
> Mbah,
> 
> Thanks to Stefan we'll fix this issue fast.  However you should be the 
> one writing this unit test case instead of him.  Next time please look 
> into doing this yourself if you want a faster response.
> 
> Alex
> 
> 
> Mbah Tenjoh-Okwen wrote:
>> Thanks. I will be on the alert to see what you come up with.
>>
>>


Re: [jira] Commented: (DIRSERVER-752) Alias Problem

Posted by Alex Karasulu <ao...@bellsouth.net>.
Mbah,

Thanks to Stefan we'll fix this issue fast.  However you should be the 
one writing this unit test case instead of him.  Next time please look 
into doing this yourself if you want a faster response.

Alex


Mbah Tenjoh-Okwen wrote:
> Thanks. I will be on the alert to see what you come up with.
> 
> 
> On 10/1/06, *Stefan Zoerner* <szoerner@apache.org 
> <ma...@apache.org>> wrote:
> 
>     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 <ma...@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)* < jira@apache.org
>     <ma...@apache.org>
>      > <mailto:jira@apache.org <ma...@apache.org>>> 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
>      >     < http://www.atlassian.com/software/jira>
>      >
>      >
>      >
> 
> 
>     --
> 
> 


Re: [jira] Commented: (DIRSERVER-752) Alias Problem

Posted by Mbah Tenjoh-Okwen <te...@googlemail.com>.
Thanks. I will be on the alert to see what you come up with.


On 10/1/06, Stefan Zoerner <sz...@apache.org> wrote:
>
> 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)* <jira@apache.org
> > <ma...@apache.org>> 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
> >     <http://www.atlassian.com/software/jira>
> >
> >
> >
>
>
> --
>
>

Re: [jira] Commented: (DIRSERVER-752) Alias Problem

Posted by Stefan Zoerner <sz...@apache.org>.
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)* <jira@apache.org 
> <ma...@apache.org>> 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
>     <http://www.atlassian.com/software/jira>
> 
> 
> 


--