[英]Integrate Apache Mahout with ElasticSearch in Spring Boot
I have a Spring Boot application integrated with ElasticSearch.我有一个与 ElasticSearch 集成的 Spring Boot 应用程序。 When i am trying to add Apache Mahout as a maven dependency, the application is no longer running with this error:
当我尝试将 Apache Mahout 添加为 maven 依赖项时,应用程序不再运行,并出现以下错误:
Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/lucene/util/Accountable
If i remove the mahout dependency the application is running.如果我删除了 mahout 依赖项,则应用程序正在运行。 pom.xml:
pom.xml:
<dependencies>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-core</artifactId>
<version>0.9</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
The dependency is resolved by maven, the project compiles with no error but when i start it, the server stops.依赖项由 maven 解决,项目编译没有错误,但是当我启动它时,服务器停止。 Any idea?
任何的想法? Thank you
谢谢
In order to use the latest versions of Elasticsearc v6.x and Spring-boot, you have to focus on the matrix versions.为了使用最新版本的 Elasticsearch v6.x 和 Spring-boot,您必须关注矩阵版本。 because while I was trying to integrate Elasticsearch v6.2.2 as dependencies into my spring-boot v1.5.XI faced several errors.
因为当我尝试将 Elasticsearch v6.2.2 作为依赖项集成到我的 spring-boot v1.5.XI 时遇到了几个错误。 thus spring-boot v2.x is the compatible one with ES v6.x so the following link will help you to know the matrix between versions for your project : https://www.elastic.co/support/matrix#matrix_compatibility after doing that , use the last version of apache mahout .
因此 spring-boot v2.x 与 ES v6.x 兼容,因此以下链接将帮助您了解项目版本之间的矩阵: https ://www.elastic.co/support/matrix#matrix_compatibility 完成后也就是说,使用最新版本的 apache mahout。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.