Hi,

I am trying to deploy the ServiceMix Azure bundles in an Apache Felix
based app. The application interacts with Azure Storage, and I'm trying
a simple example to upload a blob.

I have the following bundles defined:

- org.apache.servicemix.bundles/org.apache.servicemix.bundles.azure-
storage-blob/12.12.0_1
- org.apache.servicemix.bundles/org.apache.servicemix.bundles.azure-
storage-common/12.12.0_1
- org.apache.servicemix.bundles/org.apache.servicemix.bundles.azure-
core/1.17.0_1

When trying to upload a blob I get the following:

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:51)
        at com.azure.core.http.HttpClient.createDefault(HttpClient.java:50)
        at com.azure.core.http.HttpClient.createDefault(HttpClient.java:40)
        at 
com.azure.core.http.HttpPipelineBuilder.build(HttpPipelineBuilder.java:62)
        at 
com.azure.storage.blob.implementation.util.BuilderHelper.buildPipeline(BuilderHelper.java:135)
        at 
com.azure.storage.blob.BlobServiceClientBuilder.buildAsyncClient(BlobServiceClientBuilder.java:114)
        at 
com.azure.storage.blob.BlobServiceClientBuilder.buildClient(BlobServiceClientBuilder.java:90)

I checked and neither azure-core-http-netty nor azure-core-http-okhttp
are available as OSGi bundles. I can always fallback to wrapping those
bundles, but I was wondering whether someone has a better approach,
given that some parts of the Azure SDK is already OSGified in
ServiceMix.

Thanks!
Robert

Reply via email to