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

Stefan Egli edited comment on OAK-4107 at 6/28/16 8:47 AM:
-----------------------------------------------------------

[~chetanm], good point. I've modified the original patch for the 1.4 branch, 
and added logging the exception (probably null though) and errorMessage. 
Attached [^OAK-4107.1_4_branch.patch]. wdyt?
(EDIT: I'd also apply this additional logging to trunk as that makes sense 
there too of course)


was (Author: egli):
[~chetanm], good point. I've modified the original patch for the 1.4 branch, 
and added logging the exception (probably null though) and errorMessage. 
Attached [^OAK-4107.1_4_branch.patch]. wdyt?

> NPE in MongoDocumentStore.determineServerTimeDifferenceMillis
> -------------------------------------------------------------
>
>                 Key: OAK-4107
>                 URL: https://issues.apache.org/jira/browse/OAK-4107
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mongomk
>            Reporter: Chetan Mehrotra
>            Assignee: Stefan Egli
>            Priority: Minor
>              Labels: candidate_oak_1_4
>             Fix For: 1.6, 1.5.2
>
>         Attachments: OAK-4107.1_4_branch.patch, OAK-4107.patch
>
>
> On system startup with Mongo following exception is seen
> {noformat}
> 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)
> {noformat}
> Per code {{serverLocalTime}} appears to be null
> {code}
>  final Date serverLocalTime = db.command("serverStatus").getDate("localTime");
>         final long end = System.currentTimeMillis();
>         final long midPoint = (start + end) / 2;
>         final long serverLocalTimeMillis = serverLocalTime.getTime();
> {code}



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

Reply via email to