VanRoy / spring-data-jest

Spring Data Implementation for Jest
Apache License 2.0
227 stars 78 forks source link

NoCLassDefFoundError: FacetedPage #30

Closed hooligan495 closed 7 years ago

hooligan495 commented 7 years ago

I'm using this library in 2 projects in one of the project I am getting hte following error when I try to launch it:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticsearchTemplate' defined in class path resource [com/github/vanroy/springboot/autoconfigure/data/jest/ElasticsearchJestDataAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.core.ElasticsearchOperations]: Factory method 'elasticsearchTemplate' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/elasticsearch/core/FacetedPage

I'm not sure this is a bug with the library but I've been trying to figure this out for a while. Do you know what would cause something like this? Is it a dependency issue? In my other project things work fine.

I'm not sure this is an actual bug with teh library.. do you have a discussion group somwhere?

hooligan495 commented 7 years ago

what do you know.. i figured out the issue for now.

hooligan495 commented 7 years ago

I take that back lol... I removed all code that stores my data to elasticsearch and things compile. All I have to do is add the dependency to the spring data elasticsearch jest and this error pops up.

VanRoy commented 7 years ago

Hi @hooligan495 , can you send me you pom.xml or build.gradle to help me in my investigation ?

alpar-t commented 7 years ago

I have ran into this myself. Turns out I was not paying enough attention at the version comparability matrix from the Readme. Once I sorted that out this went away. Would be great to include this in the spring boot gradle plugin to have it bring in the correct version automatically.

VanRoy commented 7 years ago

Hi @atorok , indeed it would be a great enhancement. But i don't think that Spring Boot team will validate this type of PR. I have already proposed the Spring Data Jest implementation into Spring Data ES project and it wasn't compatible with her goals.

Thanks for your feedback.