# Error:(44, 45) java: cannot find symbol symbol: method settingsBuilder() location: class org.elasticsearch.common.settings.Settings

**URL:** <https://discuss.elastic.co/t/error-44-45-java-cannot-find-symbol-symbol-method-settingsbuilder-location-class-org-elasticsearch-common-settings-settings/193364>\
**Category:** Elasticsearch\
**Created:** [August 1, 2019, 3:43pm UTC](https://discuss.elastic.co/t/error-44-45-java-cannot-find-symbol-symbol-method-settingsbuilder-location-class-org-elasticsearch-common-settings-settings/193364 "2019-08-01T15:43:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![patri](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@patri](https://discuss.elastic.co/u/patri)\
**Post date:** [August 1, 2019, 3:43pm UTC](https://discuss.elastic.co/t/error-44-45-java-cannot-find-symbol-symbol-method-settingsbuilder-location-class-org-elasticsearch-common-settings-settings/193364/1 "2019-08-01T15:43:14Z")

</div>

\< public boolean initEStransportClinet()  
{  
try {  
// Build the settings for our client.  
String clusterId = "cd494a44d4d946ae9d84ee858cfb6cae"; // Your cluster ID here  
String region = "us-east-1"; // Your region here  
boolean enableSsl = true;

```
            Settings settings = Settings.settingsBuilder()
                .put("transport.ping_schedule", "5s")
                //.put("transport.sniff", false) // Disabled by default and *must* be disabled.
                .put("cluster.name", clusterId)
                .put("action.bulk.compress", false)
                .put("shield.transport.ssl", enableSsl)
                .put("request.headers.X-Found-Cluster", clusterId)
                .put("shield.user", "username:password") // your shield username and password
                .build();

        String hostname = clusterId + "." + region + ".aws.found.io";

```

// Instantiate a TransportClient and add the cluster to the list of addresses to connect to.  
// Only port 9343 (SSL-encrypted) is currently supported.  
Client client = TransportClient.builder()  
.addPlugin(ShieldPlugin.class)  
.settings(settings)  
.build()  
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(hostname), 9243));

> 

I am receiving the below errors for the above mentioned code.  
Kindly provide a fix for it.

Errors:

Error:(44, 45) java: cannot find symbol  
symbol: method settingsBuilder()  
location: class org.elasticsearch.common.settings.Settings  
Error:(57, 13) java: cannot find symbol  
symbol: class Client  
location: class javadeveloperzone.pojo.ESDocumentIndexingMain  
Error:(57, 44) java: cannot find symbol  
symbol: method builder()  
location: class org.elasticsearch.client.transport.TransportClient  
Error:(58, 32) java: cannot find symbol  
symbol: class ShieldPlugin  
location: class javadeveloperzone.pojo.ESDocumentIndexingMain  
Error:(61, 46) java: cannot find symbol  
symbol: class InetSocketTransportAddress  
location: class javadeveloperzone.pojo.ESDocumentIndexingMain

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [August 9, 2019, 4:48pm UTC](https://discuss.elastic.co/t/error-44-45-java-cannot-find-symbol-symbol-method-settingsbuilder-location-class-org-elasticsearch-common-settings-settings/193364/2 "2019-08-09T16:48:45Z")

</div>

What version of Elasticsearch are you running? It looks like your transport client is a very old version. Typically the type of error you are seeing occurs when older jars get loaded with newer versions.

---

<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:** [September 6, 2019, 4:48pm UTC](https://discuss.elastic.co/t/error-44-45-java-cannot-find-symbol-symbol-method-settingsbuilder-location-class-org-elasticsearch-common-settings-settings/193364/3 "2019-09-06T16:48:57Z")

</div>

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