基于es5.6.2版本,在使用RestHighLevelClient时,在服务器上无法进行初始化,报错如下:
Caused by: java.util.ServiceConfigurationError: org.elasticsearch.plugins.spi.NamedXContentProvider: Provider org.elasticsearch.join.spi.ParentJoinNamedXContentProviderorg.elasticsearch.search.aggregations.matrix.spi.MatrixStatsNamedXContentProviderorg.elasticsearch.join.spi.ParentJoinNamedXContentProvider not found
at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:1.8.0_131]
at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:1.8.0_131]
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:1.8.0_131]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:1.8.0_131]
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:1.8.0_131]
at org.elasticsearch.client.RestHighLevelClient.getProvidedNamedXContents(RestHighLevelClient.java:596) ~[stormjar.jar:?]
at org.elasticsearch.client.RestHighLevelClient.<init>(RestHighLevelClient.java:187) ~[stormjar.jar:?]
at org.elasticsearch.client.RestHighLevelClient.<init>(RestHighLevelClient.java:177) ~[stormjar.jar:?]
一开始以为是类没有加载进入JVM,但检查后发现是有加载进去的!!
Caused by: java.util.ServiceConfigurationError: org.elasticsearch.plugins.spi.NamedXContentProvider: Provider org.elasticsearch.join.spi.ParentJoinNamedXContentProviderorg.elasticsearch.search.aggregations.matrix.spi.MatrixStatsNamedXContentProviderorg.elasticsearch.join.spi.ParentJoinNamedXContentProvider not found
at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:1.8.0_131]
at java.util.ServiceLoader.access$300(ServiceLoader.java:185) ~[?:1.8.0_131]
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372) ~[?:1.8.0_131]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:1.8.0_131]
at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:1.8.0_131]
at org.elasticsearch.client.RestHighLevelClient.getProvidedNamedXContents(RestHighLevelClient.java:596) ~[stormjar.jar:?]
at org.elasticsearch.client.RestHighLevelClient.<init>(RestHighLevelClient.java:187) ~[stormjar.jar:?]
at org.elasticsearch.client.RestHighLevelClient.<init>(RestHighLevelClient.java:177) ~[stormjar.jar:?]
一开始以为是类没有加载进入JVM,但检查后发现是有加载进去的!!
1 个回复
Charele - Cisco4321
赞同来自:
另外,我没有明白的是,RestHighLevelClient是客户端用的,需要在服务器上部署?