I want to create a es client but I got a error like this: Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate org.elasticsearch.common.inject.InjectorImpl.toString()
The problem only seems to be happening when the debugger tries to print the "InjectorImpl" class, seem like there is some cyclic references in the internal State that cause "toString" to go into a loop:
java.lang.StackOverflowError
[...]
at org.elasticsearch.common.inject.InjectorImpl.toString(InjectorImpl.java:831)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at java.util.AbstractMap.toString(AbstractMap.java:559)
at org.elasticsearch.common.inject.internal.ToStringBuilder.toString(ToStringBuilder.java:51)
at org.elasticsearch.common.inject.internal.InstanceBindingImpl.toString(InstanceBindingImpl.java:107)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at java.util.AbstractCollection.toString(AbstractCollection.java:462)
at java.util.Collections$UnmodifiableCollection.toString(Collections.java:1035)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at java.util.AbstractMap.toString(AbstractMap.java:559)
at org.elasticsearch.common.inject.internal.ToStringBuilder.toString(ToStringBuilder.java:51)
at org.elasticsearch.common.inject.InjectorImpl.toString(InjectorImpl.java:831)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at java.util.AbstractMap.toString(AbstractMap.java:559)
at org.elasticsearch.common.inject.internal.ToStringBuilder.toString(ToStringBuilder.java:51)
at org.elasticsearch.common.inject.internal.InstanceBindingImpl.toString(InstanceBindingImpl.java:107)
This shouldn't cause any real problems with Elasticsearch, or do you experience any issues?
It didn't cause any problem in the using of client. I just wanted to check if the client had been created successfully and I saw the exception in the debugger.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.