I assume that this is probably due to a change in the implementation from your point of view in terms of updating the elastic search version from version below 2.4 to the current one.
The correct way to implement the above with the current version would be -
TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)
.addTransportAddress(new InetSocketTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), 9200));
While the implementation from and to Version 2.3 was like this:
Client client = TransportClient.builder().build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host1"), 9300))
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host2"), 9300));
And I get to the definition of AbstractMethodError here
, . , ; - .
mvn dependency:tree exclude org.elasticsearch.client.