NoClassDefFoundError on akka.actor.Props$ when upgrading to 2.5.19

Greetings,

I’m trying to upgrade akka from 2.5.18 to 2.5.19 as well as scala-library to 2.12.8 and previously working code now gives me

java.lang.NoClassDefFoundError: Could not initialize class akka.actor.Props$
[java] akka.actor.Props.create(Props.scala)

When i look at the exception the static initializer is throwing a InvocationTargetException

and embedded in that i see the target is

java.lang.NoClassDefFoundError: scala/Product$class

When i look in the scala-library jar i do in fact see that class (well i see scala/Product at least), However the cause of the NCDF on Product is indeed a ClassNotFoundException.

When i revert scala-library back to 2.11.12 it (but leave akka-actor at 2.5.19) it works fine.

Anyone know what my issue could be?

Usually with that kind of errors it is about mixed Akka versions or Scala versions, check the dependency tree that there isn’t some mismatch. Could be because of transitive dependencies of some library you are using pulls in an older Akka module etc.

I’ve also seen sbt having problems detecting changes in Scala versions / dependencies leading to the same error. Cleaning and rebuilding the project might help.

Johannes