null batchResponse when POSTing a batch request.
@Ndiritu がすでに取り組んでいます。
2024年12月19日 から。
評価
この issue はまだ評価されていません。
説明
Describe the bug
Caused by: java.lang.NullPointerException: The following parameter cannot be null: batchResponse
at java.base/java.util.Objects.requireNonNull(Objects.java:259) ~[?:?]
at com.microsoft.graph.core.content.BatchResponseContent.<init>(BatchResponseContent.java:42) ~[microsoft-graph-core-3.2.1.jar:?]
at com.microsoft.graph.core.requests.BatchRequestBuilder.post(BatchRequestBuilder.java:53) ~[microsoft-graph-core-3.2.1.jar:?]
at com.microsoft.graph.serviceclient.CustomBatchRequestBuilder.post(CustomBatchRequestBuilder.java:41) ~[microsoft-graph-6.16.0.jar:?]
at com.microsoft.graph.core.requests.BatchRequestBuilder.post(BatchRequestBuilder.java:67) ~[microsoft-graph-core-3.2.1.jar:?]
at com.microsoft.graph.serviceclient.CustomBatchRequestBuilder.post(CustomBatchRequestBuilder.java:53) ~[microsoft-graph-6.16.0.jar:?]
2024-11-21T16:05:58 WARNING [TOMCAT] okhttp3.internal.platform.Platform log okhttp3.OkHttpClient - A connection to https://graph.microsoft.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
Our code started throwing a null pointer exception as shown in the logs. The code and requests normally run fine, however this error seems to have randomly occurred. Once we saw this error all subsequent requests to Azure also failed until the process was restarted.
Under what circumstances could this happen?
Expected behavior
Requests complete successfully. Failed requests should throw an ApiException?
How to reproduce
This does not occur under normal circumstances - the following code usually works fine.
We have seen the same error on two different underlying requests, wrapped in batch requests.
mGraphClient.users().byUserId(x).memberOf().graphGroup() and mGraphClient.groups().getByIds()
An example:
ClientSecretCredential vCredential = new ClientSecretCredentialBuilder().clientId(mClientId).tenantId(mTenantId).clientSecret(mClientSecret).build();
mGraphClient = new GraphServiceClient(vCredential, "https://graph.microsoft.com/.default");
-----
BatchRequestContentCollection vBatchRequest = new BatchRequestContentCollection(mGraphClient);
for (String vId : pIds) {
RequestInformation vRequestInfo = mGraphClient.users().byUserId(vId).memberOf().graphGroup().toGetRequestInformation(requestConfiguration -> {
requestConfiguration.queryParameters.select = new String[] { ID };
requestConfiguration.queryParameters.top = MAX_PAGE_SIZE;
});
vBatchRequest.addBatchRequestStep(vRequestInfo);
}
BatchResponseContentCollection vBatchResponse = mGraphClient.getBatchRequestBuilder().post(vBatchRequest, null);
SDK Version
6.16.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
- 主要言語
- Java
- スター
- 444
- フォーク
- 154
- 平均マージ
- 18時間 28分
- マージ済み PR(30日)
- 4
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-sdk-java のほかの issue
-
status:waiting-for-triage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoftgraph/msgraph-sdk-java#2610 ·
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
microsoftgraph/msgraph-sdk-java#2656 ·
-
status:waiting-for-triage type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
microsoftgraph/msgraph-sdk-java#2654 ·
-
status:waiting-for-triage
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoftgraph/msgraph-sdk-java#2639 ·
-
status:waiting-for-triage type:bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
microsoftgraph/msgraph-sdk-java#2589 · コメント 1 件 ·
microsoftgraph/msgraph-sdk-java の issue をすべて見る
似ている issue
-
certification
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's オープンbug ecr
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Needs: Triage Type: Feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/copilot-sdk#2760 ·