gpt4 book ai didi

java - 名称为 'Lucene54' 的 org.apache.lucene.codecs.Codec 类型的 SPI 类不存在

转载 作者:搜寻专家 更新时间:2023-10-31 20:17:50 29 4
gpt4 key购买 nike

对于 lucene-core-5.5.2,我在 weblogic 服务器中遇到了问题 a。独立的搜索应用程序可以工作,但是当我部署为 WEB APP 时,它失败并出现以下错误

Exception type is 'java.lang.ExceptionInInitializerError'. Runtime error: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene54' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: []

我尝试在 classes/ 下创建文件夹结构,因为 META-INF/services/ 添加了 lucene-core-5.5.2.jar META- 中的所有文件INF\services\ 目录还为 META-INF\services\ 创建了 jar 文件并添加到类路径中,但它无法识别 META-INF/services 到加载SPI

非常感谢任何帮助。

最佳答案

请在

中添加以下文件

文件夹:META-INF/services/

文件:org.apache.lucene.codecs.Codec

文本:org.apache.lucene.codecs.lucene54.Lucene54Codec

请在 https://anwaarlabs.wordpress.com/2017/02/25/lucene-an-spi-class-of-type-org-apache-lucene-codecs-codec-with-name-does-not-exist/ 查看带有详细说明的解决方案

关于java - 名称为 'Lucene54' 的 org.apache.lucene.codecs.Codec 类型的 SPI 类不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38361533/

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