-
Notifications
You must be signed in to change notification settings - Fork 85
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
Shading does not allow for multiple versions of AHC #229
Comments
Unfortunately using this.getClass().getClassLoader() doesn't help. It still loads the resource without the |
We had this problem another way around... have also Dispatch in our project, can't update it to newest (using AHC 2.1.x+ (now 2.4.4)). That library didn't find new properties required by AHC. Fun didn't stop there, we reverted to dispatch 0.13.x with AHC 2.0.39 just to find out Play Framework does not work with Netty Server. AHC 2.0.39 used Netty 4.0.x and Play Server requires 4.1.x (4.1.22 for now). If this project isn't upgraded to use AHC 2.1+ people running play with netty backend can't upgrade to 2.6 if they are also using libraries like For us only thing to do is burn Play WS and forbid anybody to touch it. I don't know what are benefits for shading but I don't see them if property files aren't also renamed and truly separated from originals. |
It's for when projects have conflicting versions of Netty. If you have conflicting version of AHC, then that's a different problem, and one that's very hard to resolve without patching AHC code itself. |
A workaround for now is to create |
Are you looking for help?
No.
Play WS Version (2.5.x / etc)
2.6.11
API (Scala / Java / Neither / Both)
Scala
Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)
Linux me 4.11.8-041108-generic #201706290836 SMP Thu Jun 29 12:38:45 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.17.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
Library Dependencies
"org.asynchttpclient" % "async-http-client" % "2.0.31", // force this version because C* (Cassandra) driver 3.2 pulls in netty 4.0.44
Expected Behavior
Please describe the expected behavior of the issue, starting from the first action.
Actual Behavior
Please provide a description of what actually happens, working from the same starting point.
The problem is that my application has both "org.asynchttpclient" % "async-http-client" % "2.0.31" (to be compatible with Cassandra Java Driver) and the shaded one by Play WS.
The application fails with:
The reason is because play.shaded.ahc.org.asynchttpclient.config.AsyncHttpClientConfigHelper.Config#parsePropertiesFile() finds ahc-default.properties in the original jar, not in the shaded one. And because of this
play.shaded.ahc.org.asynchttpclient.maxRedirects
property cannot be found.This issue is related to #87
The text was updated successfully, but these errors were encountered: