We are trying to embed elasticsearch in our spring application, but
whenever I try to enable ec2 discovery we get the following error repeated
many times in our log.
We are creating the node using the following code:
Settings settings = ImmutableSettings.settingsBuilder().put(settingsLoader
.load(
"cluster.name: es-demo\n"+
"cloud:\n"+
" aws:\n"+
" access_key: <access_key>\n"+
" secret_key: <secret_key>\n"+
"discovery:\n"+
" type: ec2\n"+
"gateway:\n"+
" type: s3\n"+
" s3:\n"+
" bucket: \n")).build();
Node node = nodeBuilder().settings(settings).node();
return node.client();
These settings worked with the standalone version of elastic fox, but in
our spring web app. If I don't try and use ec2 discovery then I do not get
any errors.
This is the error - it gets repeated constantly - I think something is
stuck in some kind of inifinite loop.
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'homeController': Injection of autowired dependencies
failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire
field: private me.vollow.core.item.service.ItemService
me.vollow.web.home.controller.HomeController.itemService; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'itemService': Injection of autowired dependencies failed;
nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire
field: private me.vollow.core.fulltextsearch.IFullTextSearchService
me.vollow.core.item.service.ItemService.fullTextSearchService; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'fullTextSearchService': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire
field: org.elasticsearch.client.Client
me.vollow.core.fulltextsearch.ElasticSearchService.client; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'client' defined in class path resource
[me/vollow/core/config/ServiceConfig.class]: Instantiation of bean failed;
nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Factory
method [public org.elasticsearch.client.Client
me.vollow.core.config.ServiceConfig.client()] threw exception; nested
exception is org.elasticsearch.common.inject.CreationException: Guice
creation errors:
- 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.cache.NodeCache.(Unknown Source)
while locating org.elasticsearch.cache.NodeCache
Caused by: 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.common.inject.internal.ConstructionContext$DelegatingInvocationHandler.invoke(ConstructionContext.java:102)
at $Proxy63.add(Unknown Source)
at org.elasticsearch.cache.NodeCache.(NodeCache.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
.....
--
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.
For more options, visit https://groups.google.com/groups/opt_out.