Bean method 'elasticsearchClient' not loaded because auto-configuration 'ElasticsearchAutoConfiguration' was excluded
See original GitHub issue2017-02-11T16:48:16.697363+00:00 app[web.1]: ***************************
2017-02-11T16:48:16.697364+00:00 app[web.1]: APPLICATION FAILED TO START
2017-02-11T16:48:16.697364+00:00 app[web.1]: ***************************
2017-02-11T16:48:16.697365+00:00 app[web.1]:
2017-02-11T16:48:16.697366+00:00 app[web.1]: Description:
2017-02-11T16:48:16.697366+00:00 app[web.1]:
2017-02-11T16:48:16.697367+00:00 app[web.1]: Parameter 0 of method elasticsearchTemplate in no.lavoapp.config.ElasticSearchConfiguration required a bean of type 'org.elasticsearch.client.Client' that could not be found.
2017-02-11T16:48:16.697369+00:00 app[web.1]: - Bean method 'elasticsearchClient' not loaded because auto-configuration 'ElasticsearchAutoConfiguration' was excluded
2017-02-11T16:48:16.697369+00:00 app[web.1]:
2017-02-11T16:48:16.697370+00:00 app[web.1]:
2017-02-11T16:48:16.697370+00:00 app[web.1]: Action:
2017-02-11T16:48:16.697371+00:00 app[web.1]:
2017-02-11T16:48:16.697371+00:00 app[web.1]: Consider revisiting the conditions above or defining a bean of type 'org.elasticsearch.client.Client' in your configuration.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
java - Spring Boot - Disable embedded ElasticSearch without ...
If I remove the lines from the POM, my code needs major updates, because all annotations to ES cannot be found anymore. Is...
Read more >Error creating bean with name 'client' - Elasticsearch
I was trying to integrate elastic search onto spring-boot application but I got this *Error creating bean with name 'client' *Exception, not ......
Read more >Spring Boot Reference Guide
Spring Boot auto-configuration attempts to automatically configure your Spring application based on the jar dependencies that you have added. For example, If ...
Read more >springboot整合elasticsearch时的版本问题: - 殇之弑梦 - 博客园
IllegalStateException: Failed to load ApplicationContext at ... autoconfigure/data/elasticsearch/ElasticsearchAutoConfiguration.class]: Bean ...
Read more >Spring boot builds and starts, but no serving happens
(Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @uuhnaut69 , with SpringDataJest you don’t have access to elasticsearch Client. Do you have try the solution described here : http://stackoverflow.com/questions/39623238/setting-up-bonsai-elasticsearch-in-jhipster-heroku/42206596#42206596 ?
@VanRoy, after further tries, I realise that it is more an issue with the spring boot Bean initialisation. In the
@Service
class constructor, passing theJestElasticsearchTemplate jestElasticsearchTemplate
, it does not injected properly and cause the error above with the following stacktrace:If instead I use the annotation
@Autowired
over theJestElasticsearchTemplate
object, it does work. So it seems more a priority issue about the order of Spring boot Bean initialisation.What do you think?