question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apache HTTP Client generates warning on older version usage

See original GitHub issue

After upgrading AWS SDK Java v2 to 2.7.13 (latest available release), I can see the following warning message:

11:04:07.122 WARN [main]: s.a.a.h.a.i.utils.ApacheUtils: NoSuchMethodError was thrown when disabling normalizeUri. This indicates you are using an old version (< 4.5.8) of Apache http client. It is recommended to use http client version >= 4.5.9 to avoid the breaking change introduced in apache client 4.5.7 and the latency in exception handling. See https://github.com/aws/aws-sdk-java/issues/1919 for more information

Apache HTTP Client has been downgraded to 4.5.7 after upgrading to the latest SDK version.

See #1168

According to Maven Dependency plugin this version of Apache HTTP Client is a transitive dependency from: software.amazon.awssdk:dynamodb:jar:2.7.13:compile

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
dankolesnikovcommented, Oct 31, 2020

If you are facing this warning and running a project using spark-submit, a probable cause for it is Apache Spark (2.4 in my case) is using http-client of 4.5.6 and that class get picked up first by the class loader and ignores 4.5.9 used by aws-sdk-java-v2.

To solve this, we simply shade this dependency in sbt-assembly to ensure that AWS SDK used 4.5.9 instead of 4.5.6:

assemblyShadeRules in assembly := Seq(
  ShadeRule.rename("org.apache.http.**" -> "org.apache.httpShaded@1").inAll
)
0reactions
arianaa30commented, Mar 5, 2021

Is WARN in the SDK just a warning, or an Error in fact (it causes the program not to run correctly)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

What version of httpclient is compatible with the Amazon SDK ...
So I'd say HTTP Client version 4.5.2 is compatible with the AWS SDK version 1.11.5. If you are using a dependency management tool...
Read more >
HttpClient Performance Optimization Guide
For proxied requests caution must be taken as older HTTP/1.0 proxies may be unable to correctly handle the 'Expect-continue' handshake. See the http....
Read more >
Configuring the Apache-based HTTP client
Synchronous service clients in the AWS SDK for Java 2.x use an Apache-based HTTP client, ApacheHttpClient by default. The SDK's ApacheHttpClient is based...
Read more >
Apache HttpClient Example - CloseableHttpClient | DigitalOcean
Create instance of CloseableHttpClient using helper class HttpClients . · Create HttpGet or HttpPost instance based on the HTTP request type.
Read more >
RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1
1. If the Request-URI is encoded using the "% HEX HEX" encoding [42], the origin server MUST decode the Request-URI in order to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found