# Getting a java.lang.StackOverflowError

**URL:** <https://discuss.elastic.co/t/getting-a-java-lang-stackoverflowerror/33884>\
**Category:** Elasticsearch\
**Created:** [November 5, 2015, 3:29pm UTC](https://discuss.elastic.co/t/getting-a-java-lang-stackoverflowerror/33884 "2015-11-05T15:29:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Buckle](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@Daniel\_Buckle](https://discuss.elastic.co/u/Daniel_Buckle)\
**Post date:** [November 5, 2015, 3:29pm UTC](https://discuss.elastic.co/t/getting-a-java-lang-stackoverflowerror/33884/1 "2015-11-05T15:29:57Z")

</div>

I've just upgraded elasticsearch from 1.7 to 2.0 and when I'm trying to index documents I'm receiving this error: `Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate org.elasticsearch.common.inject.InjectorImpl.toString()`

Here is the code I'm trying to run

```
    try {
        conn = DbConnectionBroker.getDbConnection();
        Settings settings = Settings.settingsBuilder().put("cluster.name", "elasticsearch").build();
        client = TransportClient.builder().settings(settings).build().addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300)); searchClient = new CreateElasticSearchIndex();
        searchClient.runMainJobLoop(client);

    } catch (Exception e) {
        Logger.log(e);
    } finally {
        client.close();
        try {
            conn.close();
        } catch (SQLException e) {
            Logger.log(e);
        }
    }

```

`

---

<div class="post-metadata">

**Author:** ![skyfall](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@skyfall](https://discuss.elastic.co/u/skyfall)\
**Post date:** [February 20, 2017, 3:34am UTC](https://discuss.elastic.co/t/getting-a-java-lang-stackoverflowerror/33884/2 "2017-02-20T03:34:30Z")

</div>

i have the same issue , did you fixed it ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:03pm UTC](https://discuss.elastic.co/t/getting-a-java-lang-stackoverflowerror/33884/3 "2017-07-05T22:03:06Z")

</div>


