You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.NullPointerException: null
at com.microsoft.azure.documentdb.internal.SessionContainer.compareAndSetToken(SessionContainer.java:194)
at com.microsoft.azure.documentdb.internal.SessionContainer.setSessionToken(SessionContainer.java:167)
at com.microsoft.azure.documentdb.internal.SessionContainer.setSessionToken(SessionContainer.java:156)
at com.microsoft.azure.documentdb.internal.SessionTokenHelper.captureSessionToken(SessionTokenHelper.java:138)
at com.microsoft.azure.documentdb.DocumentClient.captureSessionToken(DocumentClient.java:3155)
at com.microsoft.azure.documentdb.DocumentClient.doRead(DocumentClient.java:3054)
at com.microsoft.azure.documentdb.DocumentClient.readDocument(DocumentClient.java:1041)
at com.tomtom.lns.batch.dao.CosmosDBDao.getDocumentByBatchId(CosmosDBDao.java:358)
java.lang.NullPointerException: null
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at com.microsoft.azure.documentdb.internal.SessionContainer.getPartitionKeyRangeIdToTokenMap(SessionContainer.java:72)
at com.microsoft.azure.documentdb.internal.SessionContainer.resolveGlobalSessionToken(SessionContainer.java:88)
at com.microsoft.azure.documentdb.internal.SessionContainer.resolveGlobalSessionToken(SessionContainer.java:84)
at com.microsoft.azure.documentdb.DocumentClient.applySessionToken(DocumentClient.java:3143)
at com.microsoft.azure.documentdb.DocumentClient.doRead(DocumentClient.java:3051)
at com.microsoft.azure.documentdb.DocumentClient.readDocument(DocumentClient.java:1041)
at com.tomtom.lns.batch.dao.CosmosDBDao.getDocumentByBatchId(CosmosDBDao.java:358)
Hi @srinathnarayanan
We are using SDK Version: 1.16.0. We're not getting that often. Less than 20 times, while running our app stress test. It just looks strange and we don't have source codes to check it.
We stopped to see that error after removing requestOptions.setConsistencyLevel(ConsistencyLevel.Strong);
line. I'm not sure if we shouldn't set that consistency level or there is a bug in SDKs.
SDK Version: 1.16.0
We see following errors in logs:
Our retrieve method:
And for clarity getBatchDocumentLink() method:
Our DocumentClient is created by:
The text was updated successfully, but these errors were encountered: