# Confusing situation with the class PreBuiltTransportClient

**URL:** <https://discuss.elastic.co/t/confusing-situation-with-the-class-prebuilttransportclient/87338>\
**Category:** Elasticsearch\
**Created:** [May 27, 2017, 3:12pm UTC](https://discuss.elastic.co/t/confusing-situation-with-the-class-prebuilttransportclient/87338 "2017-05-27T15:12:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjof](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjof/32/13185_2.png) [@rjof](https://discuss.elastic.co/u/rjof)\
**Post date:** [May 27, 2017, 3:12pm UTC](https://discuss.elastic.co/t/confusing-situation-with-the-class-prebuilttransportclient/87338/1 "2017-05-27T15:12:45Z")

</div>

**Elasticsearch version** : 5.4.0

**Plugins installed** : []

**JVM version** (`java -version`):

java version "1.8.0\_131"  
Java(TM) SE Runtime Environment (build 1.8.0\_131-b11)  
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

**OS version** (`uname -a` if on a Unix-like system):

Linux ideapad 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt11-1~bpo70+1 (2015-06-08) x86\_64 GNU/Linux

**Description of the problem including expected versus actual behavior** :

There's a confusing situation with a **package name** (at least for me)

Is it: package org.elasticsearch.transport.client;

Or: package org.elasticsearch.client.transport;

In the source at: [https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/client/transport/TransportClient.java](https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/client/transport/TransportClient.java)

I see: package org.elasticsearch.client.transport;

In the sources from [mvnrepository.com](http://mvnrepository.com) y get: package org.elasticsearch.client.transport;

**Steps to reproduce** :

1. Include **"org.elasticsearch.client" % "transport" % "5.1.1" withSources()** in a built.sbt file.

2. To instantiate the class **PreBuiltTransportClient**

import org.elasticsearch.client.transport.\_ as the name of the dependency sugests

1. Try to instantiate it and get an error

[error] /path/to/file:25: not found: type PreBuiltTransportClient  
[error] val client = new PreBuiltTransportClient(settings)  
[error] ^

1. Checking the source code in my local .ivy repository the class begins with

**package org.elasticsearch.transport.client;**

1. Importing as the package in my local repository makes the error go away.

import org.elasticsearch.transport.client.\_

If it's something I misunderstood please be so kind to explain me.

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [May 29, 2017, 5:04pm UTC](https://discuss.elastic.co/t/confusing-situation-with-the-class-prebuilttransportclient/87338/2 "2017-05-29T17:04:56Z")

</div>

Moving this to the main Elasticsearch forum

---

<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:** [June 26, 2017, 5:05pm UTC](https://discuss.elastic.co/t/confusing-situation-with-the-class-prebuilttransportclient/87338/3 "2017-06-26T17:05:36Z")

</div>

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