Edit:
"Play 2.6.0" was released and it uses Netty 4.1.
TL; DR
Play 2.5.0 and gRPC are incompatible due to binary incompatibility between Netty 4 and Netty 4.1.
This is why it does not work with Play 2.5.0, but it works with Play 2.4.0:
Play 2.5.0 uses version Netty 4.0.33.Final , which is declared (transitively through netty-reactive streams version 1.0.2 ) for example:
<dependency> <groupId>io.netty</groupId> <artifactId>netty-handler</artifactId> <version>4.0.33.Final</version> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-codec-http</artifactId> <version>4.0.33.Final</version> </dependency>
Version 4.0.33.Final superseded by version 4.0.34.Final , which was added transitively via async-http-client , and these are the network dependencies used by Play 2.5.0:
io.netty:netty-buffer:4.0.34.Final io.netty:netty-codec-http:4.0.34.Final io.netty:netty-codec:4.0.34.Final io.netty:netty-common:4.0.34.Final io.netty:netty-handler:4.0.34.Final io.netty:netty-transport:4.0.34.Final
Listening to 2.4.6 on the other hand requires only the following netty dependency:
io.netty:netty:3.8.0.Final
So, while Play 2.5.0 depends on many small net packages, Play 2.4.6 depends on only one netty package. This is due to the fact that Netty 4 changed the structure of the project to divide the project into several subprojects so that the user can add only the necessary functions from Netty. More importantly, "the Netty package name has been changed from org.jboss.netty to io.netty ."
Why are these changes important here:
- There is no dependency conflict between gRPC with 2.4.6, because gRPC does not require the
io.netty:netty dependency, not even transitively. Because of this, there is no eviction. - There are no conflicts at the class level because the classes had different package names (
org.jboss.netty and io.netty ), and then they have different full names. They are considered as different classes.
There are conflicts with Play 2.5.0, because Netty 4 and Netty 4.1 have the same dependencies (then 4.0.34 are superseded by 4.1), and because now we have the same full class names between these two versions - binary incompatibilities arise files.
This is a long explanation to say that now there is no way to get gRPC and Play 2.5.0 to work with Netty. Even if you decide to use the server server server Akka , there is a possibility of a conflict with Play WS.