An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classp
背景介绍:
当ES中guava库与hive等组件的库冲突时,对Elasticsearch库进行shade,relocate解决库冲突问题。
当使用"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"对资源进行重定向后,仍旧报错,报错信息:
An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classp
根本原因:需要对META-INF/services资源合并。
解决方法有两种:
1、Maven配置
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
2、手动在工程的src目录下创建目录META-INF/services/ 并手动将上面两个红框里的内容做合并,这样所有路径都包含了,缺一不可。
参考:
http://stackoverflow.com/questions/35066597/elasticsearch-in-a-runnable-jar-lucene-problems
http://rocketeer.leanote.com/post/dcab93e5bf35
An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classp的更多相关文章
- A SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene40' does not exist.
简单的建立索引和查询索引并不难,关键在于他的二次开发,让他适合你自己的需求 既然要二次开发就必须查看源码 首先看看索引过程中的核心类吧: IndexWriter 这个是核心组件, 建立和打开索引,以及 ...
- org.apache.jasper.JasperException:Unable to read TLD "META-INF/c-1_0-rt.tld" from JAR file jstl-1.2.jar
前两天把项目从eclipse EE版搬到MyEclipse中了.配置好jdk,确定build path中没有报错后,在tomcat中运行.结果,报错: org.apache.jasper.Jasper ...
- 一种常见的maven打包后同名文件冲突错误
在使用一些开源框架的时候(比如spark.hadoop.lucene等),偶尔会见到说找不到某个具体实现类或者某个配置(比如spark的akka配置)不见了. 部分例子如下: [Lucene]An S ...
- 【手把手教你全文检索】Apache Lucene初探
PS: 苦学一周全文检索,由原来的搜索小白,到初次涉猎,感觉每门技术都博大精深,其中精髓亦是不可一日而语.那小博猪就简单介绍一下这一周的学习历程,仅供各位程序猿们参考,这其中不涉及任何私密话题,因此也 ...
- Apache Lucene学习笔记
Hadoop概述 Apache lucene: 全球第一个开源的全文检索引擎工具包 完整的查询引擎和搜索引擎 部分文本分析引擎 开发人员在此基础建立完整的全文检索引擎 以下为转载:http://www ...
- Apache Lucene(全文检索引擎)—分词器
目录 返回目录:http://www.cnblogs.com/hanyinglong/p/5464604.html 本项目Demo已上传GitHub,欢迎大家fork下载学习:https://gith ...
- [转载] Apache Lucene初探
转载自http://www.cnblogs.com/xing901022/p/3933675.html 讲解之前,先来分享一些资料 首先呢,学习任何一门新的亦或是旧的开源技术,百度其中一二是最简单的办 ...
- MyEclipse配置tomcat报错 - java.lang.UnsupportedClassVersionError: org/apache/lucene/store/Directory : Unsupported major.minor version 51.0
1 开发Servlet程序时,MyEclipse配置好tomcat与JDK之后,启动时控制台报下列错误: 1 java.lang.UnsupportedClassVersionError: org/a ...
- 【手把手教你全文检索】Apache Lucene初探 (zhuan)
http://www.cnblogs.com/xing901022/p/3933675.html *************************************************** ...
随机推荐
- {}+[]与console.log({}+[])结果不同?从JavaScript的大括号谈起
看到这样一个问题:为什么直接在控制台运行{} + []和用console.log({} + [])输出,两者结果不一样? 于是乎打开chrome的控制台运行了一下: 为什么结果会这样呢?不得已学习一下 ...
- 汉化 android studio
Analyze APK...android.jar\com\android\tools\idea\apk\viewer AnalyzeApkAction.class
- win10 大文件 安卓android studio修改 汉化
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha ========== win10 大文件 gradle-3.3-all 这个里面有 大量 ...
- BZOJ.5417.[NOI2018]你的名字(后缀自动机 线段树合并)
LOJ 洛谷 BZOJ 考虑\(l=1,r=|S|\)的情况: 对\(S\)串建SAM,\(T\)在上面匹配,可以得到每个位置\(i\)的后缀的最长匹配长度\(mx[i]\). 因为要去重,对\(T\ ...
- HDU.3516.Tree Construction(DP 四边形不等式)
题目链接 贴个教程: 四边形不等式学习笔记 \(Description\) 给出平面上的\(n\)个点,满足\(X_i\)严格单增,\(Y_i\)严格单减.以\(x\)轴和\(y\)轴正方向作边,使这 ...
- error MSB3073 解决办法
发现拷贝命令编译错误,查看输出列表发现时无法找到相应的路径. 1.顺着这个思路第一个想到的是中文路径的问题,先修改了盘符的中文名称,发现还是无法解决具体的问题. 2.后来反复查阅网上的资料,发现帮助并 ...
- AppleScript脚本学习记录《二》
关于AppleScript 说到AppleScript,可能涉及到三个含义: 1.AppleScript语言:就是苹果脚本的语言,用来编写运行于Mac系统的脚本. 2.AppleScript脚本:就是 ...
- 用Jersey构建RESTful服务1--HelloWorld
一.环境1.Eclipse Juno R22. Tomcat 73. Jersey 2.7 下载地址( https://jersey.java.net/download.html) 二.流程1.Ec ...
- GOCN每日新闻(2017-08-12)
1.为什么我们从 Python 转向 Go 2.Go 实现常见数据结构 3.3年半,50万行 Go 代码 4.Go 游戏引擎 oka 5.Go 是隐藏学习曲线的语言
- 配置sonar和jenkins进行代码审查
转自: http://www.cnblogs.com/gao241/p/3190701.html, 版权归原作者所有. 本文以CentOS操作系统为例介绍Sonar的安装配置,以及如何与Jenkin ...