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 *************************************************** ...
随机推荐
- 以添加评论组件为例看angular2请求数据的处理
在NiceFish项目中,数据请求处理并没有用Promise的那一套方法,用的是Observable(观察者模式),我将其理解成生产者和消费者模式 如下简单例子:出自(https://segmentf ...
- Docker网络模式说明
现在的Docker版本不推荐继续使用Link了,而是推荐用网络模式解决问题,简单讲一下最常用的几个网络模式,其他我用到时候再补充. bridge -net不加参数就是默认的bridge模式,这个默认b ...
- DesignMode的重载 C#
也就是说一个控件只有在它自己被拖拽到设计器的时候,其 DesignMode 才是真,如果它被包含在其他控件中被加入到设计器,那么那个控件才是在设计模式,而它不是!换句话说,DesignMode 并不能 ...
- windows Server 2008 R2 添加新用户时密码不满足密码策略的要求
---------------------------本地用户和组---------------------------在计算机 WINSERVER2008R2 上创建用户 lintx 时,出现了以下 ...
- HTML:Browser 对象
ylbtech-HTML:Browser 对象 1.返回顶部 1. Window 对象 Window 对象表示浏览器中打开的窗口. 如果文档包含框架(frame 或 iframe 标签),浏览器会为 ...
- grid - gap
grid-gap默认还有两个参数 如果grid写默认方式,则行.列都会使用相同的单位 如果grid写两个参数,则行和列各自生效 如果grid写行方式,则仅有行生效 如果grid写列方式,则仅有列生 ...
- 【VSCode】Windows下VSCode便携式c/c++环境
http://blog.csdn.net/c_duoduo/article/details/52083494 Ver 1.1 完整版(修复mingw环境变量错误)下载: http://pan.baid ...
- llvm Array Bounds Check Elimination
http://www.knosof.co.uk/vulnerabilities/arraybnd.html http://www.cs.utsa.edu/dmz/techrep/2010/CS-TR- ...
- 【Zookeeper】源码分析之网络通信(二)之NIOServerCnxn
一.前言 前面介绍了ServerCnxn,下面开始学习NIOServerCnxn. 二.NIOServerCnxn源码分析 2.1 类的继承关系 public class NIOServerCnxn ...
- sublime python3中读取和写入文件时如何解决编码问题
# -*- coding: utf-8 -*- #分析用户身份审核信息 #python 3.5 #xiaodeng #http://apistore.baidu.com/apiworks/servic ...