【问题标题】:Integrate Apache Mahout with ElasticSearch in Spring Boot在 Spring Boot 中将 Apache Mahout 与 ElasticSearch 集成
【发布时间】:2019-02-12 20:21:31
【问题描述】:

我有一个与 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 解决,项目编译没有错误,但是当我启动它时,服务器停止。 任何想法? 谢谢

【问题讨论】:

  • 尝试其他版本的 Mahout(0.9 以上)
  • 上面没有版本,只有下面,我试过了……
  • 怎么样?最新的稳定版本是去年发布的 0.13.0。啊,mahout-core 最高可达 0.9,对吧

标签: java spring spring-boot elasticsearch mahout


【解决方案1】:

为了使用最新版本的 Elasticsearc 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。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-07
    • 1970-01-01
    • 2019-09-09
    • 2020-10-24
    • 1970-01-01
    • 2015-08-20
    • 1970-01-01
    相关资源
    最近更新 更多