Closed serban-cordis closed 1 year ago
The latest stable version of org.apache.httpcomponents (5.2, 5.2.1) doesn't contain the class org.apache.hc.core5.http2.impl.nio.ClientHttpProtocolNegotiator.
So with Notification-Hubs-java-sdk 1.0.3, you should stay on version 5.2-alpha2 of org.apache.httpcomponents. You can use httpcore5 or httpclient5:
<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
<version>5.2-alpha2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.2-alpha2</version>
</dependency>
Hi,
I am using a simple CLI project, no other dependencies besides:
I am getting a class definition not found: Exception in thread "httpclient-dispatch-1" java.lang.NoClassDefFoundError: org/apache/hc/core5/http2/impl/nio/ClientHttpProtocolNegotiator at org.apache.hc.client5.http.impl.async.HttpAsyncClientEventHandlerFactory.createHandler(HttpAsyncClientEventHandlerFactory.java:257)
When i checked, org.apache.hc.core5.http2.impl.nio.ClientHttpProtocolNegotiator cannot be found in org.apache.httpcomponents.client5:httpclient5:5.1.3 jar
To fix this i have to add and extra:
This dependency contains the missing class.
Why is this not included directly in the notification-hubs-java-sdk artifact? I am using 1.0.3, the latest version on maven repo.
Should a new release with the upgraded http be required in order for this to work directly without any extra artifacts?
Please advise.
Thank you, Serban