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

NPE in MongoDocumentStore.determineServerTimeDifferenceMillis

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.5.2, 1.6.0
    • mongomk
    • None

    Description

      On system startup with Mongo following exception is seen

      07.03.2016 06:26:10.529 *WARN* [FelixStartLevel] org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService registerNodeStore: got RuntimeException while trying to determine time difference to server: java.lang.NullPointerException
      java.lang.NullPointerException: null
      	at org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore.determineServerTimeDifferenceMillis(MongoDocumentStore.java:1568)
      	at org.apache.jackrabbit.oak.plugins.document.util.LeaseCheckDocumentStoreWrapper.determineServerTimeDifferenceMillis(LeaseCheckDocumentStoreWrapper.java:203)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStore(DocumentNodeStoreService.java:514)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStoreIfPossible(DocumentNodeStoreService.java:371)
      	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.bindBlobStore(DocumentNodeStoreService.java:554)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      

      Per code serverLocalTime appears to be null

       final Date serverLocalTime = db.command("serverStatus").getDate("localTime");
              final long end = System.currentTimeMillis();
      
              final long midPoint = (start + end) / 2;
              final long serverLocalTimeMillis = serverLocalTime.getTime();
      

      Attachments

        1. OAK-4107.patch
          1 kB
          Stefan Egli
        2. OAK-4107.1_4_branch.patch
          2 kB
          Stefan Egli

        Issue Links

          Activity

            People

              stefanegli Stefan Egli
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: