繁体   English   中英

在 Spring Boot 中将 Apache Mahout 与 ElasticSearch 集成

[英]Integrate Apache Mahout with ElasticSearch in Spring Boot

我有一个与 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.XI 时遇到了几个错误。 因此 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM