Я работаю над интеграцией хранилища Blob -Blob в Azure в приложение Java с помощью Azure SDK. При инициализации BlobContainerClient я сталкиваюсь с следующей ошибкой только на сервере (не на моей локальной машине): < /p>
Caused by: **java.lang.IllegalStateException**: A request was made to load the default HttpClient provider but one could not be found on the classpath. If you are using a dependency manager, consider including a dependency on azure-core-http-netty or azure-core-http-okhttp. Depending on your existing dependencies, you have the choice of Netty or OkHttp implementations. Additionally, refer to https://aka.ms/azsdk/java/docs/custom-httpclient to learn about writing your own implementation.
at com.azure.core.implementation.http.HttpClientProviders.createInstance(HttpClientProviders.java:37)
at com.azure.core.http.HttpClient.createDefault(HttpClient.java:27)
at com.azure.core.http.HttpPipelineBuilder.build(HttpPipelineBuilder.java:60)
at com.azure.storage.blob.implementation.util.BuilderHelper.buildPipeline(BuilderHelper.java:110)
at com.azure.storage.blob.BlobServiceClientBuilder.buildAsyncClient(BlobServiceClientBuilder.java:107)
at com.azure.storage.blob.BlobServiceClientBuilder.buildClient(BlobServiceClientBuilder.java:84)
at com.azure.service.impl.AzureBlobAuthService.authenticate(AzureBlobAuthService.java:46)
< /code>
Вот соответствующая часть моего кода: < /p>
BlobContainerClient containerClient = new BlobContainerClientBuilder()
.endpoint(config.getSasUrl())
.containerName(config.getContainerName())
.buildClient();
< /code>
Дополнительная информация:
Я использую Maven со следующей зависимостью: < /p>
com.azure
azure-storage-blob
12.9.0
Подробнее здесь: https://stackoverflow.com/questions/796 ... vider-when
Azure SDK для Java - OldalStateException для пропущенного поставщика httpclient при инициализации BlobContainerClient ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение