# Integration test failing after upgrade to 1.4

**URL:** <https://discuss.elastic.co/t/integration-test-failing-after-upgrade-to-1-4/20803>\
**Category:** Elasticsearch\
**Created:** [November 18, 2014, 2:52am UTC](https://discuss.elastic.co/t/integration-test-failing-after-upgrade-to-1-4/20803 "2014-11-18T02:52:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_2](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Deepak\_2](https://discuss.elastic.co/u/Deepak_2)\
**Post date:** [November 18, 2014, 2:52am UTC](https://discuss.elastic.co/t/integration-test-failing-after-upgrade-to-1-4/20803/1 "2014-11-18T02:52:34Z")

</div>

Hi,

After upgrading to ES 1.4, integration tests for our ES plugin started  
failing. The plugin works fine when deployed directly to ES. The issue  
seems to be only with integration tests which extend  
ElasticsearchIntegrationTest class.

I have uploaded sample project to recreate the issue @

> **[dr2014/ES1.4\_IntegrationTest\_Issue](https://github.com/dr2014/ES1.4_IntegrationTest_Issue)**
>
> Contribute to ES1.4\_IntegrationTest\_Issue development by creating an account on GitHub.

There seems to be some problem with how Guice injects Client when  
integration tests are executed.

Any ideas as to how to resolve this issue?

Thanks,  
Deepak

Partial stacktrace:

org.elasticsearch.common.inject.CreationException: Guice creation errors:

1. Tried proxying org.elasticsearch.discovery.DiscoveryService to support a  
circular dependency, but it is not an interface.  
while locating org.elasticsearch.discovery.DiscoveryService  
for parameter 7 at  
org.elasticsearch.discovery.local.LocalDiscovery.(Unknown Source)  
while locating org.elasticsearch.discovery.local.LocalDiscovery  
while locating org.elasticsearch.discovery.Discovery  
for parameter 2 at  
org.elasticsearch.discovery.DiscoveryService.(Unknown Source)  
while locating org.elasticsearch.discovery.DiscoveryService  
for parameter 1 at  
org.elasticsearch.cluster.service.InternalClusterService.(Unknown  
Source)  
while locating org.elasticsearch.cluster.service.InternalClusterService  
while locating org.elasticsearch.cluster.ClusterService  
for parameter 2 at  
org.elasticsearch.action.admin.indices.open.TransportOpenIndexAction.(Unknown  
Source)  
while locating  
org.elasticsearch.action.admin.indices.open.TransportOpenIndexAction  
while locating org.elasticsearch.action.support.TransportAction annotated  
with  
@org.elasticsearch.common.inject.multibindings.Element(setName=,uniqueId=305)  
at _unknown_  
while locating java.util.Map\<org.elasticsearch.action.GenericAction,  
org.elasticsearch.action.support.TransportAction\>  
for parameter 1 at  
org.elasticsearch.client.node.NodeClusterAdminClient.(Unknown Source)  
while locating org.elasticsearch.client.node.NodeClusterAdminClient  
for parameter 1 at  
org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)  
while locating org.elasticsearch.client.node.NodeAdminClient  
for parameter 2 at  
org.elasticsearch.client.node.NodeClient.(Unknown Source)  
while locating org.elasticsearch.client.node.NodeClient  
while locating org.elasticsearch.client.Client  
for parameter 2 at com.tr.es.plugin.TestESRestHandler.(Unknown  
Source)  
while locating com.tr.es.plugin.TestESRestHandler

2. Error injecting constructor, java.lang.IllegalStateException: This is a  
proxy used to support circular references involving constructors. The  
object we're proxying is not constructed yet. Please wait until after  
injection has completed to use this object.  
at org.elasticsearch.cluster.InternalClusterInfoService.(Unknown  
Source)  
while locating org.elasticsearch.cluster.InternalClusterInfoService  
while locating org.elasticsearch.cluster.ClusterInfoService  
for parameter 3 at  
org.elasticsearch.cluster.routing.allocation.AllocationService.(Unknown  
Source)  
while locating  
org.elasticsearch.cluster.routing.allocation.AllocationService  
for parameter 2 at

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d98d3ad9-4464-4add-b915-fdc73aea5f4b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d98d3ad9-4464-4add-b915-fdc73aea5f4b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jekstrom](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jekstrom](https://discuss.elastic.co/u/jekstrom)\
**Post date:** [February 5, 2015, 7:52pm UTC](https://discuss.elastic.co/t/integration-test-failing-after-upgrade-to-1-4/20803/2 "2015-02-05T19:52:42Z")

</div>

We had a similar issue with a plugin regarding this. I found the solution  
here on this post from  
2012: [http://elasticsearch-users.115913.n3.nabble.com/Running-ES-Client-inside-ES-Plugin-td3925864.html](http://elasticsearch-users.115913.n3.nabble.com/Running-ES-Client-inside-ES-Plugin-td3925864.html)

Injecting the client in setClient was throwing the AllocationService  
circular dependency exception. Changing it to retrieve from injector solved  
the issue.

On Monday, November 17, 2014 at 8:52:34 PM UTC-6, Deepak wrote:

> Hi,
> 
> After upgrading to ES 1.4, integration tests for our ES plugin started  
> failing. The plugin works fine when deployed directly to ES. The issue  
> seems to be only with integration tests which extend  
> ElasticsearchIntegrationTest class.
> 
> I have uploaded sample project to recreate the issue @  
> [GitHub - dr2014/ES1.4\_IntegrationTest\_Issue](https://github.com/dr2014/ES1.4_IntegrationTest_Issue)
> 
> There seems to be some problem with how Guice injects Client when  
> integration tests are executed.
> 
> Any ideas as to how to resolve this issue?
> 
> Thanks,  
> Deepak
> 
> Partial stacktrace:
> 
> org.elasticsearch.common.inject.CreationException: Guice creation errors:
> 
> 1. Tried proxying org.elasticsearch.discovery.DiscoveryService to support  
> a circular dependency, but it is not an interface.  
> while locating org.elasticsearch.discovery.DiscoveryService  
> for parameter 7 at  
> org.elasticsearch.discovery.local.LocalDiscovery.(Unknown Source)  
> while locating org.elasticsearch.discovery.local.LocalDiscovery  
> while locating org.elasticsearch.discovery.Discovery  
> for parameter 2 at  
> org.elasticsearch.discovery.DiscoveryService.(Unknown Source)  
> while locating org.elasticsearch.discovery.DiscoveryService  
> for parameter 1 at  
> org.elasticsearch.cluster.service.InternalClusterService.(Unknown  
> Source)  
> while locating org.elasticsearch.cluster.service.InternalClusterService  
> while locating org.elasticsearch.cluster.ClusterService  
> for parameter 2 at  
> org.elasticsearch.action.admin.indices.open.TransportOpenIndexAction.(Unknown  
> Source)  
> while locating  
> org.elasticsearch.action.admin.indices.open.TransportOpenIndexAction  
> while locating org.elasticsearch.action.support.TransportAction  
> annotated with  
> @org.elasticsearch.common.inject.multibindings.Element(setName=,uniqueId=305)  
> at _unknown_  
> while locating java.util.Map\<org.elasticsearch.action.GenericAction,  
> org.elasticsearch.action.support.TransportAction\>  
> for parameter 1 at  
> org.elasticsearch.client.node.NodeClusterAdminClient.(Unknown Source)  
> while locating org.elasticsearch.client.node.NodeClusterAdminClient  
> for parameter 1 at  
> org.elasticsearch.client.node.NodeAdminClient.(Unknown Source)  
> while locating org.elasticsearch.client.node.NodeAdminClient  
> for parameter 2 at  
> org.elasticsearch.client.node.NodeClient.(Unknown Source)  
> while locating org.elasticsearch.client.node.NodeClient  
> while locating org.elasticsearch.client.Client  
> for parameter 2 at com.tr.es.plugin.TestESRestHandler.(Unknown  
> Source)  
> while locating com.tr.es.plugin.TestESRestHandler
> 
> 2. Error injecting constructor, java.lang.IllegalStateException: This is a  
> proxy used to support circular references involving constructors. The  
> object we're proxying is not constructed yet. Please wait until after  
> injection has completed to use this object.  
> at org.elasticsearch.cluster.InternalClusterInfoService.(Unknown  
> Source)  
> while locating org.elasticsearch.cluster.InternalClusterInfoService  
> while locating org.elasticsearch.cluster.ClusterInfoService  
> for parameter 3 at  
> org.elasticsearch.cluster.routing.allocation.AllocationService.(Unknown  
> Source)  
> while locating  
> org.elasticsearch.cluster.routing.allocation.AllocationService  
> for parameter 2 at

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5caebd06-cda7-47ee-95bc-42a24d6446bc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5caebd06-cda7-47ee-95bc-42a24d6446bc%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:34am UTC](https://discuss.elastic.co/t/integration-test-failing-after-upgrade-to-1-4/20803/3 "2017-07-06T00:34:40Z")

</div>


