I’m getting java.io.NotSerializableException that originates from akka.remote.MessageSerializer$.serializeForArtery
I understand how to make this class serializable, but…
by design and based on code inspection and searching for references with IntelliJ, this class should never be part of an actor message, much less a remote actor message.
This turned out to be caused by an exception referencing the object.
I had this possibility in mind, but couldn’t see any possibility of an exception from reading code. I was very surprised to find what looked like a simple getter in a third-party library could throw exceptions and make blocking network calls.