# java.lang.AbstractMethodError with Spring-data-elasticsearch

**URL:** <https://discuss.elastic.co/t/java-lang-abstractmethoderror-with-spring-data-elasticsearch/144473>\
**Category:** Elasticsearch\
**Created:** [August 15, 2018, 8:23am UTC](https://discuss.elastic.co/t/java-lang-abstractmethoderror-with-spring-data-elasticsearch/144473 "2018-08-15T08:23:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kotek](https://avatars.discourse-cdn.com/v4/letter/k/4491bb/32.png) [@kotek](https://discuss.elastic.co/u/kotek)\
**Post date:** [August 15, 2018, 8:23am UTC](https://discuss.elastic.co/t/java-lang-abstractmethoderror-with-spring-data-elasticsearch/144473/1 "2018-08-15T08:23:25Z")

</div>

I'm using:

1. Spring core 4.3.7
2. Spring-data-elasticsearch 3.0.9 RELEASE
3. ES: "version": "5.5.0"
4. org.elasticsearch.client:rest:5.5.0 and transport 5.5.0
5. Spring-data-commons 1.12.8.RELEASE

Created IAuditElasticRepository.java with empty interface:  
`public interface IAuditElasticRepository extends ElasticsearchRepository<AuditDocument, String> { }`  
Created an ch-elastic.xml configuration:  
`<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="...Many needed schemas.." <context:spring-configured /> <context:annotation-config /> <elasticsearch:repositories base-package="com.**.ch.db.elasticsearch" /> </beans>`  
Autowired it in my Manager class:  
`@Autowired private IAuditElasticRepository elasticRepository;`  
And there is a parent xml called ch-db.xml which imports this ch-elastic.xml to it.  
I have read latests posts about abstractMethodError, but couldn't find anything helpful. is it related to my Spring Core Version?

Stack trace:  
`2018-07-30 07:02:25,472 INFOjava.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/ch-elasticsearch.xml]; nested exception is java.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; Caused by: java.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/ch-db.xml] Offending resource: class path resource [META-INF/ch-ws.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:/META-INF/ch-elasticsearch.xml] Offending resource: class path resource [META-INF/ch-db.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/ch-elasticsearch.xml]; nested exception is java.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:/META-INF/ch-elasticsearch.xml] Offending resource: class path resource [META-INF/ch-db.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/ch-elasticsearch.xml]; nested exception is java.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/ch-elasticsearch.xml]; nested exception is java.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414) Caused by: java.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; 2018-07-30 07:02:25,650 WARN [org.eclipse.jetty.util.component.AbstractLifeCycle] - FAILED o.e.j.w.WebAppContext{/ws,file:/C:/workspaces/ConnectedHome/Foundation/CH/main/ws/src/main/resources/webapp/}: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/ch-org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/ch-db.xml] Offending resource: class path resource [META-INF/ch-ws.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:/META-INF/ch-elasticsearch.xml] Offending resource: class path resource [META-INF/ch-db.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/ch-elasticsearch.xml]; nested exception is java.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String; at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/ch-elasticsearch.xml]; nested exception is java.lang.AbstractMethodError: Caused by: java.lang.AbstractMethodError: org.springframework.data.elasticsearch.repository.config.ElasticsearchRepositoryConfigExtension.getRepositoryFactoryClassName()Ljava/lang/String;`

1. What could be the errors? this works well with spring-boot
2. If any version change is needed- what would you recommend?
3. Should I keep working with spring-data or switch to java REST high level?

Thanks!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 12, 2018, 8:23am UTC](https://discuss.elastic.co/t/java-lang-abstractmethoderror-with-spring-data-elasticsearch/144473/2 "2018-09-12T08:23:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
