Akka - StackOverflowError during object serialization

后端 未结 2 918
无人共我
无人共我 2021-01-16 04:12

I\'m with a problem that extends for more than 2 days. When I\'m exchanging messages between actors, is accusing the JVM stack overflow.

My message is an object with

相关标签:
2条回答
  • 2021-01-16 04:38

    The likely candidate for the problem is an object which has a reference to itself. Given your expression of the domain I suspect a child has a linked list which includes itself, or a cyclic reference. That is, one of the nodes it is linked to has a link to it in turn.

    0 讨论(0)
  • 2021-01-16 04:46

    Are you using java.util.LinkedList, or a custom linked list of your own? If the latter, you need to write a custom writeObject() method for it that avoids the recursion that would happen if you didn't have one.

    0 讨论(0)
提交回复
热议问题