has your project resolved the transitive dependencies of the transport client correctly. Judging from the pom in maven central, it depends on the main elasticsearch jar. I suspect this is missing somehow in your ides project setup.
I'm not sure where the injector error comes from but I just set up a minimal maven project with only the transport client dependency in eclipse. This already pulls the core dependency as expected. I'm able to connect to a local cluster via TransportClient like this:
Since your code snippet is missing some parts and the stack trace is also not complete it is hard to guess what's wrong on your end. Maybe you can provide more information about your setup or try an even more minimal setup to at least get a simple connection going. It should be possible as I just checked myself.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.