You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SDK version used: iotHubDeviceClientVersion=2.2.0, azureStorageBlobVersion=12.22.3, azureCore=1.40.0
Project Working on a KMP project inside an android module
Description of the issue
While migrating from version 1.29.4 to 2.2.0, following the guide at FileUploadSimpleSample, an exception arises during the endpoint() method call of creating a BlobClient. The failure point is identified within the HttpHeaderName class in the fromString() function, particularly when the ExpandableStringEnum::getDefaultConstructor is invoked. The function seems to be unable to find or access the default constructor for a given class and suggests ensuring the relevant package is open to azure-core.
Code sample exhibiting the issue
val blobClient =BlobClientBuilder()
.endpoint(sasUriResponse.blobUri.toString())
.buildClient()
The exception occurs within:
privatestatic <T> MethodHandlegetDefaultConstructor(Class<T> clazz) {
try {
MethodHandles.Lookuplookup = ReflectionUtils.getLookupToUse(clazz);
returnlookup.findConstructor(clazz, methodType(void.class));
} catch (NoSuchMethodException | IllegalAccessExceptione) {
LOGGER.verbose("Can't find or access default constructor for {}, make sure corresponding package is open to azure-core", clazz.getName(), e);
} catch (Exceptione) {
LOGGER.verbose("Failed to get lookup for {}", clazz.getName(), e);
}
returnnull;
}
Console log of the issue
LOGGER.verbose("Can't find or access default constructor for {}, make sure corresponding package is open to azure-core", clazz.getName(), e);
The text was updated successfully, but these errors were encountered:
Since this issue happens when using the Azure Storage SDK, this question may be more appropriate to ask in the repo that owns the Azure Storage SDK. You can file an issue for it here. As far as this repo is concerned, we can update the sample code's dependency on the Azure Storage SDK if there is a version that fixes this issue for you.
Context
Description of the issue
While migrating from version 1.29.4 to 2.2.0, following the guide at FileUploadSimpleSample, an exception arises during the
endpoint()
method call of creating aBlobClient
. The failure point is identified within theHttpHeaderName
class in thefromString()
function, particularly when theExpandableStringEnum::getDefaultConstructor
is invoked. The function seems to be unable to find or access the default constructor for a given class and suggests ensuring the relevant package is open to azure-core.Code sample exhibiting the issue
The exception occurs within:
Console log of the issue
The text was updated successfully, but these errors were encountered: