directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seelmann (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRSERVER-1357) NullPointerException when deleting alias
Date Tue, 26 May 2009 22:34:47 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713299#action_12713299
] 

Stefan Seelmann commented on DIRSERVER-1357:
--------------------------------------------

But the server must protect itself to run into an inconsistent state and f*** up its database.

Maybe the simples thing - when deleting an entry - is to check if there is still an alias
pointing to the entry. And if so throw an exception (53 Unwilling to perfom). Just as a quick
fix to get 1.5.5 out.


> NullPointerException when deleting alias
> ----------------------------------------
>
>                 Key: DIRSERVER-1357
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1357
>             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: DIRSERVER_1357.java
>
>
> 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 org.apache.directory.server.core.partition.impl.btree.LongComparator.compare(LongComparator.java:45)
> 	at org.apache.directory.server.core.partition.impl.btree.LongComparator.compare(LongComparator.java:1)
> 	at org.apache.directory.server.core.avltree.AvlTree.find(AvlTree.java:661)
> 	at org.apache.directory.server.core.avltree.AvlTree.remove(AvlTree.java:217)
> 	at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable.remove(JdbmTable.java:662)
> 	at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex.drop(JdbmIndex.java:468)
> 	at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.dropAliasIndices(JdbmStore.java:822)
> 	at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.delete(JdbmStore.java:1098)
> 	at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition.delete(JdbmPartition.java:487)
> 	at org.apache.directory.server.core.partition.impl.btree.BTreePartition.delete(BTreePartition.java:217)
> 	at org.apache.directory.server.core.partition.DefaultPartitionNexus.delete(DefaultPartitionNexus.java:824)

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


Mime
View raw message