Skip to content

java.lang.NoClassDefFoundError: Could not initialize class com.azure.identity.implementation.RegionalAuthority #42439

Open

Description

Being from a testing background, I am novice to developer's area of libraries/classes/methods so requesting your patience :)

Describe the bug
We are in process of writing load testing scripts (using JMeter). As part of this project, we need to store our test login credentials in Azure key vault so that these scripts can read credentials from vault. To achieve this, we have written a piece of code in JSR223 preprocessor using Groovy language. But its throwing below error:

ERROR o.a.j.JMeter: Uncaught exception in thread Thread[]
java.lang.NoClassDefFoundError: Could not initialize class com.azure.identity.implementation.RegionalAuthority
at com.azure.identity.implementation.IdentityClientOptions
.<init> (IdentityClientOptions.java:99) ~[azure-identity-1.13.3.jar:1.13.3]
at com.azure.identity.CredentialBuilderBase.<init>(CredentialBuilderBase.java:47) ~[azure- identity-1.13.3.jar:1.13.3]
at com.azure.identity.DefaultAzureCredentialBuilder.<init>(DefaultAzureCredentialBuilder.java:77) ~[azure-identity-1.13.3.jar:1.13.3]
.....
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.BootstrapMethodError: java.lang.SecurityException: class "com.azure.core.implementation.ReflectiveInvoker"'s signer information does not match signer information of other classes in the same package [in thread "Login-Logout 1-1"]
at com.azure.core.util.ExpandableStringEnum.fromString(ExpandableStringEnum.java:70) ~[azure-core-1.53.0.jar:1.53.0]
at com.azure.identity.implementation.RegionalAuthority.fromString(RegionalAuthority.java:287) ~[azure-identity-1.13.3.jar:1.13.3]`
..
..

Code Snippet in JMeter Preprocessor

Image

Expected behavior
Calling DefaultAzureCredential.build() should succeed

Runtime Environment - JMeter version : 5.6.3, Java version: 17, OS: Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions