[ 
https://issues.apache.org/jira/browse/DIRSERVER-1912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny updated DIRSERVER-1912:
-----------------------------------------
    Component/s: core

> 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
>          Components: core
>    Affects Versions: 2.0.0-M15
>            Reporter: Mark DeBusschere
>            Priority: Major
>
> 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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org

Reply via email to