-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Could not initialize class reactor.netty.http.client.HttpClientSecure #19041
Comments
Error is unable to locate HttpClientSecure class in RE. HttpClientSecure Class belongs to reactor-netty(1.0.3) package. I am using all these dependencies in my project. So Add these dependencies and try,
|
Further update: It seemed like "the root cause is that you most likely have compiled a class against a different version of the class that is missing a method, than the one you are using when running it." as per stackoverflow. So tried all versions of reactor-core library. Below is the result: UNTIL version 3.2.10.RELEASE, it is java.lang.NoSuchMethodError: reactor.util.context.Context.of(Ljava/util/Map;)Lreactor/util/context/Context; FROM 3.2.11.RELEASE version, it is java.lang.NoClassDefFoundError: Could not initialize class reactor.netty.http.client.HttpClientSecure So what is the right reactor-core library version to use with azure-identity of 1.2.0 version. |
Worked??? |
Thank you @SrinivasGanesan . I used same dependencies still getting "HttpClientSecure" and verified versions of all jars inside my application package and all looks good. Any thoughts? Note: as per projectreactor page, the "HttpClientSecure" not exist in 1.0.3. Regards |
Update: Still trying to find a right versions for below dependencies:
It seems like "HttpClientSecure" class exist in reactor-netty-http but not in reactor-netty. Regards |
Thank you for filing this issue @thilagak! The Azure SDK libraries are currently using the cc: @SrinivasGanesan |
Hi @alzimmermsft , Thank you for the info. Below are my tried settings with no luck. Can you please help me to get right version?
Like said in the previous post, tried different combinations of versions between reactor-core and reactor-netty. Later found that "HttpClientSecure" class is in reactor-netty-http. Tried that too but no luck. Regards |
Oh yes, I missed a bit in my explanation, the Azure SDKs are currently using the With that, using |
Tried below but same result [
Regards |
Have u resolved this issue? I am also got stuck here. |
Sorry @SrinivasGanesan. Since this is not moving anywhere I am not sure if the SDK is broken. I am continueing my development with Azure api using Apache http client library. I am not using this SDK for now. |
Hi @thilagak, using the POM configuration sent I wasn't able to reproduce the class/method not found exceptions. Are there other dependencies being used in the project that aren't listed? |
Hi @alzimmermsft , here is my pom.xml
Regards |
Thank you so much @thilagak, that helped me locate the root issue. The Azure SDKs you are using are compatible with later versions of Spring Framework 2.2.x and 2.3.x. What I found is with that Spring parent version the underlying version of Upgrading to Spring Frame 2.3.x should resolve this issue. If that is not a possibility including |
Thank you much @alzimmermsft . Sure I will have no issue in upgrading to new springboot version. Actually I had this doubt and checked my mvn dependency-tree but was not able to locate the netty library in springboot. Given below is my dependency tree. Did I overlook something?
Regards |
Hi @thilagak , After tried many examples, following one is working for me. ( code and set of dependency ) Add all these dependency in pom.xml file.
Working example: ( using account name and account Key )
|
For More info, refer here |
@thilagak, BOM handling is one spot I wish the Maven diagnostic tooling had more clarity. The POM configuration you are using has spring-boot-starter-parent as the parent POM and it has the Netty BOM as a managed (BOM/dependencyManagement) dependency. Your POM doesn't explicitly include Netty POMs or the Netty BOM as an explicitly versioned dependency, so Maven will attempt to resolve this using its parent's configuration which will resolve to the older Netty BOM. Unfortunately, |
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
This is still an issue, can you fix the dependency so we can use it? |
Following this guide and still got the same issue: https://docs.microsoft.com/en-us/azure/developer/java/sdk/get-started Please reopen. |
I verify HttpClientConfig is not found at runtime by cosmos client despite having no issue in building. Netty and reactor dependencies is still an issue in azure-cosmos 1.16 and 1.17. Excluding its internal dependency on reactor and/or adding them apart version 1.10 won't solve the issue. Adding the Netty-all or the netty bom won't wok either. I have been impacted by this issue almost for a week |
I am also encountering this issue. |
Apologies for not seeing the responses after this issue has been closed. @malmyros, @kindlychung, @AlejandroBlanco, @BSCrumpton, would it be possible to file issues for the errors you're running into so they can be handled separately from this issue? For each the major pieces of information needed are other dependencies being used alongside the SDKs and any special runtime environments such as DataBricks, Functions, Spark, etc being used (basically any runtime that may pollute the classpath). |
@thilagak if you look at your exception:
you will notice that I had the same problem and for me the problem turned out to be in a failure to initialize the static fields within Adding the latest version of netty boringssl fixed the problem:
here is a working example of my pom.xml:
|
Disclaimer: This probably won't help if you want to be using I was running into a similar issue of with the What I ended up doing was completely excluding Example of pom.xml: <dependencyManagement>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-sdk-bom</artifactId>
<version>1.0.6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.azure.functions</groupId>
<artifactId>azure-functions-java-library</artifactId>
<version>${azure.functions.java.library.version}</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<exclusions>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-file-share</artifactId>
<exclusions>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-queue</artifactId>
<exclusions>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-okhttp</artifactId>
</dependency>
</dependencies> |
These are the dependencies versions that worked for me (using Gradle):
note |
Mitryakh/network 2022 01 01 (Azure#19412) * Adds base for updating Microsoft.Network from version stable/2021-08-01 to version 2022-01-01 * Updates readme * Updates API version in new specs and examples * Updated Explicit proxy settings by adding one boolean field to it (Azure#19011) * API for provider port (Azure#19041) * Update readme.md * Create expressRouteProviderPort.json * Create expressRouteProviderPortList.json * Create expressRouteProviderPort.json * Update custom-words.txt * Update expressRouteProviderPort.json * Update expressRouteProviderPortList.json * Update expressRouteProviderPort.json * Add WAF match variable operators (Azure#18925) ### webapplicationfirewall.json * Add GreaterThanOrEquals operator and Any operator to custom rule match conditions in WAF policy spec * Add VirtualHub Router autoscale configuration (Azure#19131) Co-authored-by: Andrii Kalinichenko <ankalini@microsoft.com> * Adding rule priority to Tls Proxy routing rule object model (Azure#19135) Co-authored-by: Vinay Mundada <vimundad@microsoft.com> * swagger changes for new ssl policies (Azure#19183) * Update Swagger Spec for VMSS Packet Capture (Azure#19202) * Update Swagger Spec for VMSS Packet Capture * Remove extra line * Update Swagger spec for Connection Monitor VMSS (Azure#19203) * Adding new endpoint in ConnectionMonitor * Changing ConnectionMonitor endpoints order * Add flushConnection to NSG (Azure#19085) * Merge NetworkManger into 2022-01-01 (Azure#19169) * Merge NetworkManger into 2022-01-01 * Remove EffectiveVnet APIs * Remove SecurityUser Resource * update readme * Fix as comments * fix as comments * remove network group type * Add new parameter noInternetAdvertise to CustomIPPrefix (Azure#19340) * fix * fix Co-authored-by: Weiheng Li <weihl@microsoft.com> * Route Server Integration feature swagger changes (Azure#19215) * Route Server Integration feature swagger changes * prettier run changes * updating api version in examples file * fixing test errors * fixing test errors * fixing modelvalidation errors * fixing test errors * fixing modelvalidation errors * changes based on review comments * fixing lintdiff failure * updating examples * update wrong enum value for customipprefix (Azure#19382) * fix * fix * fix Co-authored-by: Weiheng Li <weihl@microsoft.com> * Updated ExplicitProxySettings to ExplicitProxy on Firewall Policy ver2022-01-01 (Azure#19299) Co-authored-by: Gizachew Eshetie <v-geshetie@microsoft.com> * Add resource type (Azure#19434) Co-authored-by: Andrii Kalinichenko <ankalini@microsoft.com> * Fix prettier errors (Azure#19462) Co-authored-by: Andrii Kalinichenko <ankalini@microsoft.com> Co-authored-by: uditmisra52 <103006702+uditmisra52@users.noreply.github.com> Co-authored-by: jashsing-mic <79445297+jashsing-mic@users.noreply.github.com> Co-authored-by: Anurag Kishore <kishore.1337.anurag@gmail.com> Co-authored-by: AndriiKalinichenko <kalinichenkoandrew@gmail.com> Co-authored-by: Andrii Kalinichenko <ankalini@microsoft.com> Co-authored-by: Vinay Jayant Mundada <vinaymundada27@gmail.com> Co-authored-by: Vinay Mundada <vimundad@microsoft.com> Co-authored-by: kaushik-ms <103559254+kaushik-ms@users.noreply.github.com> Co-authored-by: snagpal99 <95475229+snagpal99@users.noreply.github.com> Co-authored-by: kumaam <102141910+kumaam@users.noreply.github.com> Co-authored-by: Satya-anshu <70507845+Satya-anshu@users.noreply.github.com> Co-authored-by: yanfa317 <53584318+yanfa317@users.noreply.github.com> Co-authored-by: Weiheng Li <weihengli.tj@gmail.com> Co-authored-by: Weiheng Li <weihl@microsoft.com> Co-authored-by: Anchal Kapoor <ankapoo@microsoft.com> Co-authored-by: Gizachew-Eshetie <gizchanie@gmail.com> Co-authored-by: Gizachew Eshetie <v-geshetie@microsoft.com>
I also have this problem. Who has solved it?help pls |
Description:
I am trying java sdk samples for Azure resource manager and it seems there is a class reference issue for the reactor library.
I get below runtime error. I do see reactor.netty.http.client.HttpClientSecure not exist with reactor as per https://javadoc.io/doc/io.projectreactor.netty/reactor-netty/latest/index.html java doc.
I get below runtime error.
I followed all the steps as per https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/resourcemanager.
Please let me know is it a bug or I miss anything.
Regards
Thilaga
The text was updated successfully, but these errors were encountered: