Integration tests using Play 2.7.2 are using the NettyServer

After upgrading to Play 2.7.2 and using scalatestplus-play 4.0.2 , tests using GuiceOneServerPerSuite are trying to start the NettyServer (with a classNoFound exception).
Adding play.server.provider = play.core.server.AkkaHttpServerProvider to the integration test configuraton file fxed the problem.
Why is the AkkaHttpServer not active by default for integration tests?

Hi @vlaerci,

is it possible you had a dependency to the netty HTTP backend?
I tried to reproduce the issue you mention using one of our samples and it seems to work as expected. I think we’re missing an extra moving piece.

Thanks for raising this!


Thanks Ignas,
I see in our dependency tree that we still have a dependency on and
That results in dependencies on netty - common, - resolver, -etc/
in our libraryDependencies we specify ehcache without version but I guess that the dependency on gatling will be the reason that our integrationtests are taking Netty as Server

I have to look into this.
Thanks for the Input


FWIW, when upgrading to Play 2.7.3 from 2.7.0 in a project depending on play-netty-server I also noticed a ClassNotFound exception trying to start a Netty Server in the tests:

[info] *** ABORTED ***
[info]   java.lang.NoClassDefFoundError: io/netty/channel/unix/UnixChannelOption
[info]   at play.core.server.NettyServer.initializeChannelOptionsStaticMembers(NettyServer.scala:314)
[info]   at play.core.server.NettyServer.<init>(NettyServer.scala:63)
[info]   at play.core.server.NettyServerComponents.server(NettyServer.scala:405)
[info]   at play.core.server.NettyServerComponents.server$(NettyServer.scala:401)
[info]   at play.core.server.NettyServer$$anon$1.server$lzycompute(NettyServer.scala:390)
[info]   at play.core.server.NettyServer$$anon$1.server(NettyServer.scala:390)
[info]   at play.core.server.NettyServer$.createServerFromRouter(NettyServer.scala:390)
[info]   at play.core.server.ServerFromRouter.fromRouterWithComponents(Server.scala:315)
[info]   at play.core.server.ServerFromRouter.fromRouterWithComponents$(Server.scala:312)
[info]   at play.core.server.NettyServer$.fromRouterWithComponents(NettyServer.scala:361)

@vlaerci Is it the same exception you’re seeing?

Adding the explicit dependency on "io.netty" % "netty-transport-native-unix-common" solved this, but does anybody know why this is now necessary?

Hi @vlaerci,

I remembered we have an open PR that’s probably related to you issue. As you can see it’s set for the Milestone 2.8.0 optional which means it may make into 2.8.0 or, if that doesn’t happen, soon enough after that.


Hi @cbley,

thanks for chiming in!
I don’t know if both issues are related but @eed3si9n just raised a PR for that same issue.