java.lang.NoSuchMethodError exception observed when indexing data in elasticsearch v5.2.2

Upgraded standalone elasticsearch software from v2.1.0 to v5.2.2
can any one share solution for the below issue?

Exception in thread "elasticsearch[client][management][T#1]" java.lang.NoSuchMethodError: io.netty.buffer.CompositeByteBuf.addComponents(ZLjava/lang/Iterable;)Lio/netty/buffer/CompositeByteBuf;
at org.elasticsearch.transport.netty4.Netty4Utils.toByteBuf(Netty4Utils.java:78)
at org.elasticsearch.transport.netty4.Netty4Transport.sendMessage(Netty4Transport.java:422)
at org.elasticsearch.transport.netty4.Netty4Transport.sendMessage(Netty4Transport.java:93)
at org.elasticsearch.transport.TcpTransport.internalSendMessage(TcpTransport.java:1058)
at org.elasticsearch.transport.TcpTransport.sendRequestToChannel(TcpTransport.java:1040)
at org.elasticsearch.transport.TcpTransport.executeHandshake(TcpTransport.java:1555)
at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:502)
at org.elasticsearch.transport.TcpTransport.connectToNode(TcpTransport.java:460)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:318)
at org.elasticsearch.client.transport.TransportClientNodesService$SniffNodesSampler$1.run(TransportClientNodesService.java:488)
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:527)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

I think that you have a dependency mismatch, are you sure that you pulled everything in correctly? You should see Netty 4.1.7 dependencies on your classpath, anything else is wrong.

i have used following dependency packages but still receiving the same issues.

org.elasticsearch.plugin
transport-netty4-client
5.2.2
jar


com.lmax
disruptor
3.3.6

Netty 4.1.7 dependencies are not found.

You should use org.elasticsearch.client:transport:5.2.2 instead of org.elasticsearch.plugin:transport-netty4-client:5.2.2. It's easier to use, and includes the dependencies that you need (as long as you're pulling in transitive dependencies).

i have used org.elasticsearch.client:transport:5.2.2 API and errors got resolved.
But new issue was observed.
i.e. i am using spark 1.5.1 dependency API to insert data into elasticsearch v5.2.2.
netty version mismatch was observed w.r.to spark & elasticsearch
excluded netty all 4.x package and issue got resolved.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.