Akka version collision between Flink and Play 2.5

Viewed 460

In our project we have a Flink (1.1.3) streaming job that reads from one kafka queue, performs a map function transformation and writes to another queue.

This was working well until we introduced an outgoing REST request as part of the flow. To do this we used the PlayFramework WSClient (as it is used in other places of our stack), and created it in the code in this way:

  val config = new AhcWSClientConfig(wsClientConfig = WSClientConfig())
  val builder = new AhcConfigBuilder(config)
  val ahcConfig = builder.configure().build()
  new AhcWSClient(ahcConfig)(ActorMaterializer()(ActorSystem()))

This worked well locally, but when deploying it and running on a cluster, I got this exception:

java.lang.NoSuchMethodError: akka.util.Helpers$.toRootLowerCase(Ljava/lang/String;)Ljava/lang/String;
    at akka.stream.StreamSubscriptionTimeoutSettings$.apply(ActorMaterializer.scala:491)
    at akka.stream.ActorMaterializerSettings$.apply(ActorMaterializer.scala:243)
    at akka.stream.ActorMaterializerSettings$.apply(ActorMaterializer.scala:232)
    at akka.stream.ActorMaterializer$$anonfun$1.apply(ActorMaterializer.scala:41)
    at akka.stream.ActorMaterializer$$anonfun$1.apply(ActorMaterializer.scala:41)
    at scala.Option.getOrElse(Option.scala:121)
    at akka.stream.ActorMaterializer$.apply(ActorMaterializer.scala:41)
    at com.ourstuff.etl.core.utils.web.GlobalWSClient$.generateClient(WSClientFactory.scala:32)

Investigating into it, I assumed this is a collision between Akka 2.3.x (brought by Flink 1.1.X) and Akka 2.4.x (brought by PlayFramework).

We upgraded the Flink cluster to 1.3.1 (as well as our code's dependency on Flink), assuming this will solve the issue. But the same issue seems to persist.

Any idea on what might still be causing this?

1 Answers
Related