# Using ElasticSearch Java API Client : repo is empty

**URL:** <https://discuss.elastic.co/t/using-elasticsearch-java-api-client-repo-is-empty/81920>\
**Category:** Elasticsearch\
**Created:** [April 11, 2017, 6:55am UTC](https://discuss.elastic.co/t/using-elasticsearch-java-api-client-repo-is-empty/81920 "2017-04-11T06:55:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![K.ConsortNT](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@K.ConsortNT](https://discuss.elastic.co/u/K.ConsortNT)\
**Post date:** [April 11, 2017, 6:55am UTC](https://discuss.elastic.co/t/using-elasticsearch-java-api-client-repo-is-empty/81920/1 "2017-04-11T06:55:20Z")

</div>

I'm new using ElasticSearch Java API, and i want to create the connection with my instance.

I followed the instructions in the getting started section...

So i get the following code (as simple as on the exemple ! ) :

`TransportClient mClient = new PreBuiltTransportClient(Settings.EMPTY).addTransportAddress(newInetSocketTransportAddress(InetAddress.getByName("host1"), 9300));`

But I'm facing an issue about importing classes : TransportClient and Settings, that Eclipse cannot find...

Here is the maven import :

```
<dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>transport</artifactId>
        <version>5.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>2.7</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.7</version>
    </dependency>

```

I tried to search bout this issue but didn't find the solution... Eclipse found without any problem the PreBuiltTransportClient.  
I'm sure that Maven is configured, and when I tried to explore the maven repository, I only found the PreBuiltransportClient ! Nothing else !

Any idea to get a solution and elasticsearch java api working ?

Thanks in advance !

---

<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 11, 2017, 7:35am UTC](https://discuss.elastic.co/t/using-elasticsearch-java-api-client-repo-is-empty/81920/2 "2017-04-11T07:35:26Z")

</div>

Does mvn install works from the CLI?

---

<div class="post-metadata">

**Author:** ![K.ConsortNT](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@K.ConsortNT](https://discuss.elastic.co/u/K.ConsortNT)\
**Post date:** [April 11, 2017, 7:37am UTC](https://discuss.elastic.co/t/using-elasticsearch-java-api-client-repo-is-empty/81920/3 "2017-04-11T07:37:08Z")

</div>

I tried a mvn clean & mvn install separatly. But it doesn't solve the issue...  
Same thing when i take a look inside m2 repo....

---

<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 11, 2017, 7:10pm UTC](https://discuss.elastic.co/t/using-elasticsearch-java-api-client-repo-is-empty/81920/4 "2017-04-11T19:10:46Z")

</div>

So it's a pure eclipse error. Not sure how we can help then.

---

<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 9, 2017, 7:21pm UTC](https://discuss.elastic.co/t/using-elasticsearch-java-api-client-repo-is-empty/81920/5 "2017-05-09T19:21:52Z")

</div>

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