Contains samples and utilities relating to the Azure Cosmos DB .NET SDK
MIT License
577
stars
838
forks
source link
Microsoft.Azure.Documents.BadRequestException: Message: , Windows/10.0.15063 documentdb-netcore-sdk/2.4.1 ---> System.NullReferenceException: Object reference not set to an instance of an object. #737
After upgrade to the documentdb-netcore-sdk to 2.4.1, I got the below error. The code works well at the documentdb-dotnet version 2. Could you guild me what is wrong here and how to resolve this? Thanks!
The collection is non-partition collection and the error is thrown at IDocumentQuery.ExecuteNextAsync()...
The query is just simple:
{{"query":"SELECT VALUE root FROM root WHERE ((root[\"aux\"][\"PartnerId\"] = \"necj79ij4hfc\") AND (false OR (root[\"aux\"][\"UniqueDocumentPrefix\"] = \"jarvis\"))) "}}
Microsoft.Azure.Documents.BadRequestException: Message: , Windows/10.0.15063 documentdb-netcore-sdk/2.4.1 ---> System.NullReferenceException: Object reference not set to an instance of an object.\r\n --- End of inner exception stack trace ---\r\n at Microsoft.Azure.Documents.Query.QueryPartitionProvider.GetPartitionedQueryExecutionInfoInternal(SqlQuerySpec querySpec, PartitionKeyDefinition partitionKeyDefinition, Boolean requireFormattableOrderByQuery, Boolean isContinuationExpected, Boolean allowNonValueAggregateQuery)\r\n at Microsoft.Azure.Documents.Routing.PartitionRoutingHelper.GetProvidedPartitionKeyRanges(SqlQuerySpec querySpec, Boolean enableCrossPartitionQuery, Boolean parallelizeCrossPartitionQuery, Boolean isContinuationExpected, PartitionKeyDefinition partitionKeyDefinition, QueryPartitionProvider queryPartitionProvider, String clientApiVersion, QueryInfo& queryInfo)\r\n at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.d13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.d9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at ....
Describe the bug
After upgrade to the documentdb-netcore-sdk to 2.4.1, I got the below error. The code works well at the documentdb-dotnet version 2. Could you guild me what is wrong here and how to resolve this? Thanks!
The collection is non-partition collection and the error is thrown at IDocumentQuery.ExecuteNextAsync()...
The query is just simple:
{{"query":"SELECT VALUE root FROM root WHERE ((root[\"aux\"][\"PartnerId\"] = \"necj79ij4hfc\") AND (false OR (root[\"aux\"][\"UniqueDocumentPrefix\"] = \"jarvis\"))) "}}
Microsoft.Azure.Documents.BadRequestException: Message: , Windows/10.0.15063 documentdb-netcore-sdk/2.4.1 ---> System.NullReferenceException: Object reference not set to an instance of an object.\r\n --- End of inner exception stack trace ---\r\n at Microsoft.Azure.Documents.Query.QueryPartitionProvider.GetPartitionedQueryExecutionInfoInternal(SqlQuerySpec querySpec, PartitionKeyDefinition partitionKeyDefinition, Boolean requireFormattableOrderByQuery, Boolean isContinuationExpected, Boolean allowNonValueAggregateQuery)\r\n at Microsoft.Azure.Documents.Routing.PartitionRoutingHelper.GetProvidedPartitionKeyRanges(SqlQuerySpec querySpec, Boolean enableCrossPartitionQuery, Boolean parallelizeCrossPartitionQuery, Boolean isContinuationExpected, PartitionKeyDefinition partitionKeyDefinition, QueryPartitionProvider queryPartitionProvider, String clientApiVersion, QueryInfo& queryInfo)\r\n at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.d13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Azure.Documents.Query.DefaultDocumentQueryExecutionContext.d 9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at ....