【发布时间】: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