Hi guys,
I need a little help with new elasticsearch
i made a small client for testing
@Singleton
@Startup
public class NativeElasticSingleton {
private TransportClient client;
@PostConstruct
private void init() {
try {
client = new PreBuiltTransportClient(Settings.EMPTY)
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host1"), 9300))
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host2"), 9300));
} catch (UnknownHostException e) {
}
}
i debug a little and it try to add the native plugins
Arrays.asList(
Netty3Plugin.class,
Netty4Plugin.class,
ReindexPlugin.class,
PercolatorPlugin.class,
MustachePlugin.class));
and i'm getting
Caused by: java.lang.NoSuchMethodError: org.elasticsearch.transport.client.PreBuiltTransportClient.addPlugins(Ljava/util/Collection;Ljava/util/Collection;)Ljava/util/Collection;
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:69)
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:65)