# Not able to create PreBuiltTransportClient intsance

**URL:** https://discuss.elastic.co/t/not-able-to-create-prebuilttransportclient-intsance/82162
**Category:** Elasticsearch
**Created:** [April 12, 2017, 12:34pm UTC](https://discuss.elastic.co/t/not-able-to-create-prebuilttransportclient-intsance/82162 "2017-04-12T12:34:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rMethre](https://avatars.discourse-cdn.com/v4/letter/r/cab0a1/32.png) [@rMethre](https://discuss.elastic.co/u/rMethre)
#### Post date: [April 12, 2017, 12:34pm UTC](https://discuss.elastic.co/t/not-able-to-create-prebuilttransportclient-intsance/82162/1 "2017-04-12T12:34:51Z")

</div>

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:92)

I have already looked into below link, where it says about NoopPlugin . Where do i find Noop plugin jar file or class

> [@Elasticseatch 5.0.0 NoSuchMethodError PreBuiltTransportClient.addPlugins](https://discuss.elastic.co/t/elasticseatch-5-0-0-nosuchmethoderror-prebuilttransportclient-addplugins/65912):
>
> 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…

---

<div class="post-metadata">

### Author: ![s1monw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s1monw/32/3637_2.png) [@s1monw](https://discuss.elastic.co/u/s1monw)
#### Post date: [April 18, 2017, 8:31am UTC](https://discuss.elastic.co/t/not-able-to-create-prebuilttransportclient-intsance/82162/2 "2017-04-18T08:31:54Z")

</div>

you have to pass the plugins in the constructor `new PreBuiltTransportClient(Settings.EMPTY, yourPlugin);`

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 16, 2017, 8:45am UTC](https://discuss.elastic.co/t/not-able-to-create-prebuilttransportclient-intsance/82162/3 "2017-05-16T08:45:48Z")

</div>

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