[ 
https://issues.apache.org/jira/browse/OAK-2811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15322691#comment-15322691
 ] 

Alex Parvulescu commented on OAK-2811:
--------------------------------------

linking to OAK-2401, as the current changes have been backported to 1.0 branch 
as a part of OAK-2401 so technically this issue should have fix version 
'1.0.17' too.


> Oak + data store: NPE in SegmentNodeStoreService.deactivate() leads to data 
> store not shutting down properly
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-2811
>                 URL: https://issues.apache.org/jira/browse/OAK-2811
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segmentmk
>    Affects Versions: 1.2
>            Reporter: Alexander Klimetschek
>            Assignee: Alex Parvulescu
>             Fix For: 1.2.2, 1.3.0, 1.4
>
>
> For some reason, on shutdown of a system, the {{observerTracker}} in the 
> SegmentNodeStoreService became null before deactivate() was called, leading 
> to this NPE on [line 
> 404|https://github.com/apache/jackrabbit-oak/blob/1.2/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L404]:
> {noformat}
> 24.04.2015 13:20:55.960 *ERROR* [FelixStartLevel] 
> org.apache.jackrabbit.oak-core 
> [org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService(87)] The 
> deactivate method has thrown an exception (java.lang.NullPointerException)
> java.lang.NullPointerException: null
>       at 
> org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.deactivate(SegmentNodeStoreService.java:404)
>       ... just reflection and apache felix code on shutdown
> {noformat}
> This in turn lead to the datastore not being closed ([4 lines 
> later|https://github.com/apache/jackrabbit-oak/blob/1.2/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java#L408]).
> In our case we used the CachingDataStore, which relies on close() being 
> called, if not it triggers JCR-3873, which prevents the system from starting 
> up again.
> In any case, the NPE should be guarded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to