Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-boot-starter-data-elasticsearch - Support for ES 2.0 #4339

Closed
maximede opened this issue Oct 29, 2015 · 9 comments
Closed

spring-boot-starter-data-elasticsearch - Support for ES 2.0 #4339

maximede opened this issue Oct 29, 2015 · 9 comments
Labels
status: on-hold We can't start working on this issue yet

Comments

@maximede
Copy link

Hello,

I tried upgrading one of my application to use ElasticSearch 2.0 in my spring-boot (1.3.0.RC1) app today and I encountered a problem.

I added compile("org.elasticsearch:elasticsearch:2.0.0") in my build.gradle and I now receive a pretty strange message when I try to start the application :

Exception in thread "main" java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration.elasticsearchClient
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:61)
    at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:178)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:140)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:333)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:674)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:519)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
    at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:356)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:295)
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
    at eaiw.search.api.Application.main(Application.java:88)
Caused by: java.lang.IllegalArgumentException: @ConditionalOnMissingBean annotations must specify at least one bean (type, name or annotation)

Everything was working fine when I was using compile("org.elasticsearch:elasticsearch:1.7.3")

Any idea how I could work around my problem ?

Thanks,

Maxime

@wilkinsona
Copy link
Member

I don't think there's a workaround as, AFAIK, Spring Data Elasticsearch doesn't support Elasticsearch 2.0.

@maximede
Copy link
Author

Any plan to support it ? Any way I could help with something ?

Regarding my problem, I guess that a part of it is due to the fact that they removed org.elasticsearch.common.settings.ImmutableSettings in their V2 api

The question is : wouldn't it be easier to have a spring-boot-starter-data-elasticsearch-2 with a spring-boot-data-elasticsearch-2 to support the new version ?

The biggest problem imo is that ES changed the API for filtering, depending on how much usage spring data is making of it, it could be a pretty substantial refactoring.

Would it be helpful if I tried to create a V2 and submit a PR ?

@snicoll
Copy link
Member

snicoll commented Oct 30, 2015

I think you're asking on the wrong tracker. Spring Boot integrates spring-data-elasticsearch. As Andy said, Spring Data should first support it and then we can integrate their work.

@maximede
Copy link
Author

Oh, yes indeed, I'm in the wrong place. Sorry about that.

@snicoll snicoll closed this as completed Oct 30, 2015
@snicoll snicoll added the status: on-hold We can't start working on this issue yet label Oct 30, 2015
@benneq
Copy link

benneq commented Nov 16, 2015

any update?

@wilkinsona
Copy link
Member

@benneq Please read the comments above. This issue is closed. Boot will support ES 2.0 as and when Spring Data does.

@pnowy
Copy link

pnowy commented Dec 9, 2015

You will find the info about spring-data-elasticsearch support of version 2.0 on the following ticket: https://jira.spring.io/browse/DATAES-211

@jeremie-H
Copy link

Hello ! the ticket about spring-data-elasticsearch seems to be close, but Boot doesnt use it.

@wilkinsona
Copy link
Member

@bripsi Boot 1.4 uses Elasticsearch 2.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: on-hold We can't start working on this issue yet
Projects
None yet
Development

No branches or pull requests

6 participants