Skip to content
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

AsyncHttpClient conflicts with other Netty based libraries #28

Closed
csaltos opened this issue Jun 26, 2017 · 2 comments
Closed

AsyncHttpClient conflicts with other Netty based libraries #28

csaltos opened this issue Jun 26, 2017 · 2 comments

Comments

@csaltos
Copy link

csaltos commented Jun 26, 2017

First of all, thanks for this library is very useful.

I've tried to use scala-influxdb-client and expose services with Finagle (an RPC system form Twitter) which also uses Netty but a different version of Netty and a dependency versions conflict arises at run time.

The error is:

java.lang.NoSuchMethodError: io.netty.util.internal.PlatformDependent.newAtomicIntegerFieldUpdater(Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

For solving this error you can include async-http-client as an explicit dependency excluding netty with something like:

libraryDependencies += "com.paulgoldbaum" %% "scala-influxdb-client" % "0.5.2"

libraryDependencies += "org.asynchttpclient" % "async-http-client" % "2.0.32" exclude("org.jboss.netty","netty") exclude("io.netty","netty")

Please pay attention to the versions you use when including aync-http-client explicitly, obviously this will change with time.

Possible further solutions to this issue may include:

@rpt
Copy link

rpt commented Jul 19, 2017

@csaltos I had the same problem with grpc-java. Using newer version of asynchttpclient fixes the problem. I will make a pull request with asynchttpclient:2.1.0-alpha21 which works for me.

@paulgoldbaum
Copy link
Owner

Fixed this by updating to the current release, which is the same in both projects. I'm not sure of the best long-term solution because shading seems like overkill but it might be the only way to avoid these issues. Will think about it.

Thanks for the input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants