kamon-io/kamon-akka-http

NoClassDefFoundError with Kamon and Akka HTTP when using Kanela agent

Closed this issue · 2 comments

I've encountered an issue with Akka HTTP and Kamon when using the Kanela agent where any HTTP route will throw a NoClassDefFoundError.

I've created a repository that reproduces the problem: https://github.com/archena/kanela-akka-http-problem. The README in that repository has more detail.

The original issue surfaced when running an application in Docker. Everything works in SBT, so the difference appears to be that the Kanela Java agent is added. It might well be that I'm doing something wrong here, and if so I'd be very grateful if someone can point me in the right direction.

Hey @archena 👋

I have seen this happening before due to an incompatibility issue with earlier Akka HTTP versions. I see that you have 10.1.3 in there, have you tried running the app with the latest 10.1.x?

Hi @ivantopo !

You're absolutely right, it was the version. Upgrading fixed it:

val akkaVersion = "2.5.23"
val akkaHttpVersion = "10.1.10"

I thought I had checked that already but I must have made a mistake! I'll close this issue as it's resolved now. Thanks!