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 @
There seems to be some problem with how Guice injects Client when
integration tests are executed.
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
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
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.
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
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
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.