Running into Guice creation errors (No implementation for org.elasticsearch.client.Client was bound.)


(Rahul Sharma) #1

I am trying to access a plugin created by me, using a transport client and I keep running into following error:

Exception in thread "main" org.elasticsearch.common.inject.CreationException: Guice creation errors:

  1. No implementation for org.elasticsearch.client.Client was bound.
    while locating org.elasticsearch.client.Client
    for parameter 2 at org.elasticsearch.rest.action.queryessp.ElasticSearchQueryAction.(Unknown Source)
    at unknown

1 error
at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:360)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:151)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:102)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:46)
at org.elasticsearch.client.transport.TransportClient$Builder.build(TransportClient.java:161)
at MainClass.esTransportClient(MainClass.java:65)
at MainClass.main(MainClass.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Below is the client code:

TransportClient client = TransportClient.builder()
.addPlugin(ExampleEsspPlugin.class)
.settings(Settings.builder()
.put("cluster.name", "cloud-search-dev-cluster1").build()).build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("127.0.0.1"), 9300));

Thanks in advance for help.


(Jörg Prante) #2

You can not run server-side only plugins on TransportClient.


(system) #3