-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.StorageStorage Service (Queues, Blobs, Files)Storage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
https://azuremlexamples.blob.core.windows.net/datasets/iris.csv is public so I want to list blobs without passing in credential.
I tried the below
BlobServiceClient blobServiceClient = new BlobServiceClientBuilder().endpoint("https://azuremlexamples.blob.core.windows.net").credential(new DefaultAzureCredentialBuilder().build()).buildClient();
String containerName = "datasets";
BlobContainerClient containerClient = blobServiceClient.getBlobContainerClient(containerName);
for (BlobItem blobItem : containerClient.listBlobs()) {
System.out.println("\t" + blobItem.getName());
}
with
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>12.0.0</version>
<!--https://github.com/Azure/azure-sdk-for-java/issues/15215#issuecomment-735940668 need to upgrade -->
<!--https://stackoverflow.com/questions/60589689/the-exception-java-lang-nosuchmethoderror-thrown-when-invoking-azure-storage-rel/60589738#60589738 mentions could be netty conflict -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-security-keyvault-secrets</artifactId>
<version>4.1.0</version>
</dependency>
I get
at com.azure.identity.implementation.IdentityClient.<clinit>(IdentityClient.java:59)
at com.azure.identity.implementation.IdentityClientBuilder.build(IdentityClientBuilder.java:50)
at com.azure.identity.ManagedIdentityCredential.<init>(ManagedIdentityCredential.java:33)
at com.azure.identity.DefaultAzureCredential.<init>(DefaultAzureCredential.java:37)
at com.azure.identity.DefaultAzureCredentialBuilder.build(DefaultAzureCredentialBuilder.java:18)
If I try with different versions of dependencies in pom (including latest versions) I get:
java.lang.NoSuchMethodError: com.azure.core.http.policy.HttpLogOptions.getApplicationId()Ljava/lang/String;
at com.azure.storage.blob.implementation.util.BuilderHelper.getUserAgentPolicy(BuilderHelper.java:165)
at com.azure.storage.blob.implementation.util.BuilderHelper.buildPipeline(BuilderHelper.java:73)
at com.azure.storage.blob.BlobServiceClientBuilder.buildAsyncClient(BlobServiceClientBuilder.java:107)
at com.azure.storage.blob.BlobServiceClientBuilder.buildClient(BlobServiceClientBuilder.java:84)
OR
Caused by: java.lang.NoClassDefFoundError: com/azure/core/implementation/serializer/jackson/JacksonAdapter
at com.azure.identity.implementation.IdentityClient.<clinit>(IdentityClient.java:60)
at com.azure.identity.implementation.IdentityClientBuilder.build(IdentityClientBuilder.java:50)
at com.azure.identity.ManagedIdentityCredential.<init>(ManagedIdentityCredential.java:33)
at com.azure.identity.DefaultAzureCredential.<init>(DefaultAzureCredential.java:37)
at com.azure.identity.DefaultAzureCredentialBuilder.build(DefaultAzureCredentialBuilder.java:18)
Is there any plan to provide a single 'working' bundle jar?
I also tried but hit issue in #17970 / https://stackoverflow.com/questions/65135299/azure-java-sdk-for-blob-a-request-was-made-to-load-the-default-httpclient-prov/65138749#65138749:
BlobServiceClient blobServiceClient = new BlobServiceClientBuilder().endpoint("https://azuremlexamples.blob.core.windows.net").buildClient();
String containerName = "datasets";
BlobContainerClient containerClient = blobServiceClient.getBlobContainerClient(containerName);
for (BlobItem blobItem : containerClient.listBlobs()) {
System.out.println("\t" + blobItem.getName());
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.StorageStorage Service (Queues, Blobs, Files)Storage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that