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?
Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM. On the other hand, Play is detailed as "The High Velocity Web Framework For Java and Scala". Play Framework makes it easy to build web applications with Java & Scala.
Only patched if critical bugs are found. Artifacts are available from Maven Central. Akka 2.4 reached end-of-life 12/31/2017, with the last version being 2.4.20 Artifacts are available from Maven Central. Akka 2.3 reached end-of-life April, 2017 with the last version being 2.3.16. Artifacts are available from Maven Central.
For current stable release (2.6.17) check the documentation page. Akka 2.5 was the previous stable version. Only patched if critical bugs are found. Artifacts are available from Maven Central. Akka 2.4 reached end-of-life 12/31/2017, with the last version being 2.4.20
The only way to resolve this dependency conflict is by relocating the conflicting classes into a different namespace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With