directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <>
Subject [jira] Commented: (DIRSERVER-1357) NullPointerException when deleting alias
Date Wed, 27 May 2009 12:10:45 GMT


Emmanuel Lecharny commented on DIRSERVER-1357:

First, the server handle operations done on an alias without a referenced object. It just
throws some NamingException (well, it's not that perfect, as we don't generate the resultCode
atm. I'm fixing it).

Now, all the mess is due to the fact that we have an index for alias, speeding up the retrieval
of the referenced entry. Ie, we have an Alias->Entry index. IMO, this is a waste. We already
have a Alias->DN index, as the ObjectClass is already indexed, so we immediately know that
an entry is an alias (as it has the Alias ObjectClass). Then we just have to get the aliasObjectName
attributeType, which is a DN, and a lookup for this DN will returns the entry, or nothing
if the entry does not exist.

At the end of the day, I think that this issue can vanish if we remove the Alias index. This
won't cause a lot of perfomance problem, as we just do an indirection to retrieve the entry.
Any other solution is cumbersome, complex, and error prone.

last, not least, there are some other things we have to check : RFC 4512, chap. 2.6 says that
an alias *must* not have subordinates. I'm not sure this is tested...

> NullPointerException when deleting alias
> ----------------------------------------
>                 Key: DIRSERVER-1357
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.5, 1.5.4
>            Reporter: Stefan Seelmann
>             Fix For: 1.5.5
>         Attachments:
> There is a NPE when deleting an alias entry is some special case. Here is a example DIT:
> ou=system
>    |--ou=sales
>    |    |--cn=foo  <--real entry
>    |--ou=engineering
>         |--cn=foo  <--alias, pointing to the real entry
> When I first delete the real entry and afterwards the alias the server throws an exception,
when it cleans the oneAliasIdx and subAliasIdx in the JdbmStore. Note, the exception does
not occur if the real entry and alias are direct descendants of the context entry, because
in that case the oneAliasIdx and subAliasIdx are not used.
> java.lang.NullPointerException
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message