# 'PreBuiltTransportClient' doesn't exist in my 6.3.0 library

**URL:** <https://discuss.elastic.co/t/prebuilttransportclient-doesnt-exist-in-my-6-3-0-library/156223>\
**Category:** Elasticsearch\
**Created:** [November 12, 2018, 2:45am UTC](https://discuss.elastic.co/t/prebuilttransportclient-doesnt-exist-in-my-6-3-0-library/156223 "2018-11-12T02:45:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![byeong\_seok\_park](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/byeong_seok_park/32/48056_2.png) [@byeong\_seok\_park](https://discuss.elastic.co/u/byeong_seok_park)\
**Post date:** [November 12, 2018, 2:45am UTC](https://discuss.elastic.co/t/prebuilttransportclient-doesnt-exist-in-my-6-3-0-library/156223/1 "2018-11-12T02:45:27Z")

</div>

Hi, I'm porting my project's library version from 1.7.5 to 6.3.0.

The problem is here. In previous code,

```
        import org.elasticsearch.client.transport.TransportClient;
        import org.elasticsearch.common.settings.ImmutableSettings;
        import org.elasticsearch.common.settings.Settings;
        
        Settings settings = ImmutableSettings.settingsBuilder()
                .put("cluster.name", clusterName)
                .build();

        TransportClient transportClient = new TransportClient(settings);

```

And as the version changed([https://www.elastic.co/guide/en/elasticsearch/client/java-api/6.3/transport-client.html](https://www.elastic.co/guide/en/elasticsearch/client/java-api/6.3/transport-client.html)), I modified some code like this:

```
        import org.elasticsearch.transport.client.PreBuiltTransportClient;
        import org.elasticsearch.client.transport.TransportClient;
        import org.elasticsearch.common.settings.*;

        Settings settings = Settings.builder()
                .put("cluster.name", clusterName)
                .build();

        TransportClient client = new PreBuiltTransportClient(settings);

```

but this codes first line and last line gives me errors like this:

 ![err](https://us1.discourse-cdn.com/elastic/original/3X/b/c/bc0cad5836adfecd7df1da4434fecc028e355774.png) ![err_2](https://us1.discourse-cdn.com/elastic/original/3X/5/9/599e13492f5743c8117d4ff63cdc2f0538780f86.png)

and I cannot find 'PreBuiltTransportClient' in my 6.3.0 library.

Any comment would be appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![byeong\_seok\_park](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/byeong_seok_park/32/48056_2.png) [@byeong\_seok\_park](https://discuss.elastic.co/u/byeong_seok_park)\
**Post date:** [November 12, 2018, 8:02am UTC](https://discuss.elastic.co/t/prebuilttransportclient-doesnt-exist-in-my-6-3-0-library/156223/2 "2018-11-12T08:02:52Z")

</div>

'PreBuiltTransportClient' is other library and if you want to use it, inject below dependency:

```
<dependency>
    <groupId>org.elasticsearch.client</groupId>
    <artifactId>transport</artifactId>
    <version>6.3.2</version>
</dependency>

```

Silly question. Sorry 🙂

---

<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:** [December 10, 2018, 8:02am UTC](https://discuss.elastic.co/t/prebuilttransportclient-doesnt-exist-in-my-6-3-0-library/156223/3 "2018-12-10T08:02:56Z")

</div>

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