# The method builder() is undefined for the type TransportClient

**URL:** <https://discuss.elastic.co/t/the-method-builder-is-undefined-for-the-type-transportclient/83081>\
**Category:** Elasticsearch\
**Created:** [April 20, 2017, 3:38pm UTC](https://discuss.elastic.co/t/the-method-builder-is-undefined-for-the-type-transportclient/83081 "2017-04-20T15:38:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorenzo.lucioni](https://avatars.discourse-cdn.com/v4/letter/l/50afbb/32.png) [@lorenzo.lucioni](https://discuss.elastic.co/u/lorenzo.lucioni)\
**Post date:** [April 20, 2017, 3:38pm UTC](https://discuss.elastic.co/t/the-method-builder-is-undefined-for-the-type-transportclient/83081/1 "2017-04-20T15:38:16Z")

</div>

My code is:  
...  
settings = org.elasticsearch.common.settings.Settings.builder().put("[cluster.name](http://cluster.name)","es01t").build();  
client = org.elasticsearch.client.transport.TransportClient.builder().settings(settings).build().addTransportAddress(new org.elasticsearch.common.transport.InetSocketTransportAddress(java.net.InetAddress.getByName("localhost"),Integer.valueOf(22099)));  
...

BUT Eclipse warns me:  
"The method builder() is undefined for the type TransportClient"

Any suggestion?

ES and Lucene versions are:  
elasticsearch-5.2.2.jar  
lucene-core-4.4.0.jar

Thank you,  
Lorenzo

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 20, 2017, 4:08pm UTC](https://discuss.elastic.co/t/the-method-builder-is-undefined-for-the-type-transportclient/83081/2 "2017-04-20T16:08:57Z")

</div>

Read [https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html](https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html)

---

<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 19, 2017, 12:04pm UTC](https://discuss.elastic.co/t/the-method-builder-is-undefined-for-the-type-transportclient/83081/4 "2017-05-19T12:04:48Z")

</div>

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