gpt4 book ai didi

java - 在 Spring Boot 中将 Apache Mahout 与 ElasticSearch 集成

转载 作者:行者123 更新时间:2023-11-30 06:01:26 39 4
gpt4 key购买 nike

我有一个与 ElasticSearch 集成的 Spring Boot 应用程序。当我尝试将 Apache Mahout 添加为 Maven 依赖项时,应用程序不再运行并出现以下错误:

Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/lucene/util/Accountable

如果我删除 mahout 依赖项,则应用程序正在运行。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>

依赖关系由maven解决,项目编译没有错误,但当我启动它时,服务器停止。任何想法?谢谢

最佳答案

为了使用最新版本的 Elasticsearch v6.x 和 Spring-boot,您必须关注矩阵版本。因为当我尝试将 Elasticsearch v6.2.2 作为依赖项集成到我的 spring-boot v1.5.X 中时,我遇到了几个错误。因此 spring-boot v2.x 与 ES v6.x 兼容因此,以下链接将帮助您了解项目版本之间的矩阵: https://www.elastic.co/support/matrix#matrix_compatibility完成此操作后,使用最新版本的 apache mahout 。

关于java - 在 Spring Boot 中将 Apache Mahout 与 ElasticSearch 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52223232/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com