Hi,
The ElasticsearchException#getRootCause can result in an infinite loop if there is cycle in the causes.
We run into such case because the ElasticsearchException was serialized at some point in our code.
For information a correct implementation of this method is done on apache common lib ExceptionUtils#getRootCause.
Let me know if it worths filling an issue.
Regards
ben