0

この問題が Elasticsearch または Groovy Grape によって引き起こされているかどうかはわかりません。

Grape を使用して依存関係を処理する groovy スクリプトがあります。

@Grapes([
        @Grab(group = 'org.elasticsearch', module = 'elasticsearch', version = '5.0.0'),
        @Grab(group = 'org.elasticsearch.client', module = 'transport', version = '5.0.0'),
        @Grab(group = 'org.apache.logging.log4j', module = 'log4j-api', version = '2.7'),
        @Grab(group = 'org.apache.logging.log4j', module = 'log4j-core', version = '2.7')
])

「org.elasticsearch.client.transport」からの Netty 推移的な依存関係が正しく含まれておらず、接続しようとすると次の ClassNotFoundException が発生します。

Caught: java.lang.NoClassDefFoundError: io/netty/channel/RecvByteBufAllocator
java.lang.NoClassDefFoundError: io/netty/channel/RecvByteBufAllocator
        at org.elasticsearch.transport.Netty4Plugin.getSettings(Netty4Plugin.java:39)
        at org.elasticsearch.plugins.PluginsService.lambda$getPluginSettings$0(PluginsService.java:85)
        at org.elasticsearch.plugins.PluginsService.getPluginSettings(PluginsService.java:85)
        at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:115)
        at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:228)
        at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:69)
        at org.elasticsearch.transport.client.PreBuiltTransportClient.<init>(PreBuiltTransportClient.java:65)

グレープ リゾルブ org.elasticsearch.client transport 5.0.0」を実行すると、戻り値が返されます

/Users/user/.groovy/grapes/org.elasticsearch.client/transport/jars/transport-5.0.0.jar
/Users/user/.groovy/grapes/org.elasticsearch/elasticsearch/jars/elasticsearch-5.0.0.jar
/Users/user/.groovy/grapes/org.apache.lucene/lucene-core/jars/lucene-core-6.2.0.jar
/Users/user/.groovy/grapes/org.elasticsearch/securesm/jars/securesm-1.1.jar
/Users/user/.groovy/grapes/net.sf.jopt-simple/jopt-simple/jars/jopt-simple-5.0.2.jar
/Users/user/.groovy/grapes/com.carrotsearch/hppc/jars/hppc-0.7.1.jar
/Users/user/.groovy/grapes/joda-time/joda-time/jars/joda-time-2.9.4.jar
/Users/user/.groovy/grapes/org.joda/joda-convert/jars/joda-convert-1.2.jar
/Users/user/.groovy/grapes/org.yaml/snakeyaml/bundles/snakeyaml-1.15.jar
/Users/user/.groovy/grapes/com.fasterxml.jackson.core/jackson-core/bundles/jackson-core-2.8.1.jar
/Users/user/.groovy/grapes/com.tdunning/t-digest/jars/t-digest-3.0.jar
/Users/user/.groovy/grapes/org.hdrhistogram/HdrHistogram/bundles/HdrHistogram-2.1.6.jar
/Users/user/.groovy/grapes/net.java.dev.jna/jna/jars/jna-4.2.2.jar
/Users/user/.groovy/grapes/org.elasticsearch.plugin/transport-netty3-client/jars/transport-netty3-client-5.0.0.jar
/Users/user/.groovy/grapes/io.netty/netty/bundles/netty-3.10.6.Final.jar
/Users/user/.groovy/grapes/org.elasticsearch.plugin/transport-netty4-client/jars/transport-netty4-client-5.0.0.jar
/Users/user/.groovy/grapes/io.netty/netty-common/jars/netty-common-4.1.5.Final.jar
/Users/user/.groovy/grapes/org.elasticsearch.plugin/reindex-client/jars/reindex-client-5.0.0.jar
/Users/user/.groovy/grapes/org.elasticsearch.client/rest/jars/rest-5.0.0.jar
/Users/user/.groovy/grapes/org.apache.httpcomponents/httpcore/jars/httpcore-4.4.5.jar
/Users/user/.groovy/grapes/commons-codec/commons-codec/jars/commons-codec-1.10.jar
/Users/user/.groovy/grapes/commons-logging/commons-logging/jars/commons-logging-1.1.3.jar
/Users/user/.groovy/grapes/org.elasticsearch.plugin/lang-mustache-client/jars/lang-mustache-client-5.0.0.jar
/Users/user/.groovy/grapes/com.github.spullara.mustache.java/compiler/jars/compiler-0.9.3.jar
/Users/user/.groovy/grapes/org.elasticsearch.plugin/percolator-client/jars/percolator-client-5.0.0.jar

' org.elasticsearch.plugin:transport-netty4-client:5.0.0 ' 依存関係が解決されていません。また、この依存関係を明示的に含めようとしましたが、機能しません。何か案が?

4

0 に答える 0