Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2811

Oak + data store: NPE in SegmentNodeStoreService.deactivate() leads to data store not shutting down properly

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2.2, 1.3.0, 1.4
    • Component/s: segmentmk
    • Labels:
      None

      Description

      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:

      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
      

      This in turn lead to the datastore not being closed (4 lines later).

      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.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              stillalex Alex Deparvu
              Reporter:
              alexander.klimetschek Alexander Klimetschek

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment