Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B2F510D78 for ; Tue, 5 Nov 2013 04:31:26 +0000 (UTC) Received: (qmail 8507 invoked by uid 500); 5 Nov 2013 04:31:23 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 8286 invoked by uid 500); 5 Nov 2013 04:31:19 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 8274 invoked by uid 99); 5 Nov 2013 04:31:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Nov 2013 04:31:17 +0000 Date: Tue, 5 Nov 2013 04:31:17 +0000 (UTC) From: "Mark DeBusschere (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DIRSERVER-1912) Shutdown process fails from a NPE in AbstractBTreePartition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Mark DeBusschere created DIRSERVER-1912: ------------------------------------------- Summary: Shutdown process fails from a NPE in AbstractBTreePartition Key: DIRSERVER-1912 URL: https://issues.apache.org/jira/browse/DIRSERVER-1912 Project: Directory ApacheDS Issue Type: Bug Affects Versions: 2.0.0-M15 Reporter: Mark DeBusschere During shutdown a NPE is thrown and stops the shutdown process. [22:38:54] DEBUG [org.apache.directory.server.core.DefaultDirectoryService] - +++ DirectoryService Shutdown required [22:38:54] DEBUG [org.apache.directory.server.core.DefaultDirectoryService] - --- Syncing the nexus [22:38:54] DEBUG [org.apache.directory.api.ldap.model.schema.syntaxCheckers.CsnSyntaxChecker] - Syntax valid for '20130826073011.649000Z#000000#001#000000' [22:38:54] DEBUG [org.apache.directory.api.ldap.model.schema.syntaxCheckers.GeneralizedTimeSyntaxChecker] - Syntax valid for '20131102053854.055Z' [22:38:54] DEBUG [org.apache.directory.api.ldap.model.schema.comparators.UuidComparator] - comparing UUID objects '55e570e6-68be-4175-a2f5-72b0a008b365' with 'ff64c5d1-d2ec-441e-a1c0-306c89de2264' [22:38:54] DEBUG [org.apache.directory.api.ldap.model.schema.comparators.UuidComparator] - comparing UUID objects 'da0b5bea-a4b2-4059-ac8d-78eee3aa0c1b' with 'ff64c5d1-d2ec-441e-a1c0-306c89de2264' [22:38:54] DEBUG [org.apache.directory.api.ldap.model.schema.comparators.UuidComparator] - comparing UUID objects 'ff64c5d1-d2ec-441e-a1c0-306c89de2264' with 'ff64c5d1-d2ec-441e-a1c0-306c89de2264' [22:38:54] DEBUG [org.apache.directory.api.ldap.model.schema.comparators.UuidComparator] - comparing UUID objects 'ff64c5d1-d2ec-441e-a1c0-306c89de2264' with 'ff64c5d1-d2ec-441e-a1c0-306c89de2264' [22:38:54] DEBUG [org.apache.directory.api.ldap.model.schema.registries.DefaultSchemaObjectRegistry] - Found ATTRIBUTE_TYPE ( 1.3.6.1.4.1.4203.666.1.7 NAME 'entryCSN' DESC change sequence number of the entry EQUALITY csnMatch ORDERING csnOrderingMatch SYNTAX 1.3.6.1.4.1.4203.666.11.2.1 SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation ) with oid: entrycsn [22:38:54] WARN [org.apache.directory.server.core.shared.partition.DefaultPartitionNexus] - Failed to save the contextCSN attribute value in ou=system entry. org.apache.directory.api.ldap.model.exception.LdapOperationErrorException at org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.modify(AbstractBTreePartition.java:1223) at org.apache.directory.server.core.shared.partition.DefaultPartitionNexus.sync(DefaultPartitionNexus.java:335) at org.apache.directory.server.core.DefaultDirectoryService.shutdown(DefaultDirectoryService.java:1298) at org.apache.directory.server.core.DefaultDirectoryService$1.run(DefaultDirectoryService.java:1229) at java.lang.Thread.run(Thread.java:724) Caused by: java.lang.NullPointerException at org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.updateCsnIndex(AbstractBTreePartition.java:2163) at org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.modify(AbstractBTreePartition.java:1259) at org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.modify(AbstractBTreePartition.java:1213) ... 4 more [22:38:54] WARN [org.apache.directory.server.core.DefaultDirectoryService] - Failed to shut down the directory service: default org.apache.directory.api.util.exception.MultiException: ERR_265 Grouping many exceptions on root nexus sync() at org.apache.directory.server.core.shared.partition.DefaultPartitionNexus.sync(DefaultPartitionNexus.java:343) at org.apache.directory.server.core.DefaultDirectoryService.shutdown(DefaultDirectoryService.java:1298) at org.apache.directory.server.core.DefaultDirectoryService$1.run(DefaultDirectoryService.java:1229) at java.lang.Thread.run(Thread.java:724) Nested exceptions to follow: ----------- Debug information There is no ENTRY_CSN in the entry object hence returns a null. in private void updateCsnIndex( Entry entry, String id ) throws Exception { String entryCsn = entry.get( SchemaConstants.ENTRY_CSN_AT ).getString(); entryCsnIdx.drop( id ); entryCsnIdx.add( entryCsn, id ); } ---- The 'entry' object is the following. dn[n]: ou=system objectclass: top objectclass: organizationalUnit description: The System context entry contextCSN: 20130826073011.649000Z#000000#001#000000 entryParentId: 00000000-0000-0000-0000-000000000000 ou: system entryUUID: ff64c5d1-d2ec-441e-a1c0-306c89de2264 modifyTimestamp: 20131102091722.945Z I am not sure if the bug is ENTRY_CSN was not found, or this is a valid case and the f() should check for NULL following entry.get() Using default instance from fresh install this case doesn't show up. I tested with adding a check for null and just returned and shutdown appears to finish without error. -- This message was sent by Atlassian JIRA (v6.1#6144)