directory-dev mailing list archives

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


Stefan Seelmann commented on DIRSERVER-1357:

As far as I understand, with Emmanuel's and Kiran's solution there could be aliases that points
to nowhere, right? But in that case the server must be able to handle this case for all relevant
operations and throw suitable exceptions. I'm in doubt if the server does this right now,
because it doesn't allow to inject a new alias that points to an non-existing entry. E.g.
it must handle the case, when there is such an alias that points to an non-existing entry,
and afterwards the target entry is added, then the alias indices must be updated.

I see three solutions, I already wrote in a mail [1] some time ago:
1. Reject deletion of an entry, if any alias points to this entry. This is easy to check in
the JdbmStore using the aliasIdx.
2. Automatically delete all alias entries that point to the entry that should be deleted,
some kind of cascade delete, may be dangerous. This is also easy to implement in JdmbStore.
3. Allow aliases that points to an non-existing entry. 

IMHO 1 and 2 are short-term fixes, 3 should be a goal for 2.0 but needs more work.


> 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