# Class NetworkPlugin has not found- Elasticsearch 6.1.1

**URL:** <https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335>\
**Category:** Elasticsearch\
**Created:** [January 20, 2018, 12:07pm UTC](https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335 "2018-01-20T12:07:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alien777](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@alien777](https://discuss.elastic.co/u/alien777)\
**Post date:** [January 20, 2018, 12:07pm UTC](https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335/1 "2018-01-20T12:07:43Z")

</div>

Application throws java.lang.ClassNotFoundException: org.elasticsearch.plugins.NetworkPlugin. In the pom I added two dependencies:

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

 private static final String SERVER_IP = "127.0.0.1";
  private static final Integer SERVER_PORT = 9300;

    @Bean
    public TransportClient transportClient() throws UnknownHostException {

        return new PreBuiltTransportClient(Settings.EMPTY).addTransportAddress(
                new TransportAddress(InetAddress.getByName(SERVER_IP), SERVER_PORT));;
    }

```

Before this post I deleted all files inside .m2 folder and reimport all dependencies. Anybody has idea where can be a problem?

Today I focused on available maven repository for this project and found two different dependencies, but I can't find older version in maven pom. I attach image with print screen: [ibb.co/mUgU4G](http://ibb.co/mUgU4G) . Older elasticsearch version is marked as parent and is a third party pom. Thank you for reply 🙂

---

<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:** [January 20, 2018, 5:57pm UTC](https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335/2 "2018-01-20T17:57:41Z")

</div>

Just run:

```
mvn dependency:tree

```

And you will see which other lib brings Elasticsearch 2.

As you did not share your full `pom.xml` here, it's hard to know.

---

<div class="post-metadata">

**Author:** ![alien777](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@alien777](https://discuss.elastic.co/u/alien777)\
**Post date:** [January 20, 2018, 8:31pm UTC](https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335/3 "2018-01-20T20:31:57Z")

</div>

[Raport](https://files.fm/u/ynfqx8rm)

`dependencyTreeMain` - dependency report from the whole project (dependency:tree),  
`pomCore file` - it is a module where I have implement TransportClient to Elasticsearch.

> org.elasticsearch.client:transport:6.1.1 has org.elasticsearch:elasticsearch:2.4.6

Problem should be easier to find. Additionally in the project I am using Spring Boot.

---

<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:** [January 20, 2018, 9:26pm UTC](https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335/4 "2018-01-20T21:26:20Z")

</div>

Could you share that as [gist.github.com](http://gist.github.com) instead ?

And yes I was suspecting you are using Spring. You need to fix the spring deps I think.

---

<div class="post-metadata">

**Author:** ![alien777](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@alien777](https://discuss.elastic.co/u/alien777)\
**Post date:** [January 20, 2018, 9:49pm UTC](https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335/5 "2018-01-20T21:49:25Z")

</div>

Yes of course

[gist.github raport](https://gist.github.com/anonymous/032216d31c50e220db5d4ead356ef090)

---

<div class="post-metadata">

**Author:** ![alien777](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@alien777](https://discuss.elastic.co/u/alien777)\
**Post date:** [January 21, 2018, 10:15am UTC](https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335/6 "2018-01-21T10:15:12Z")

</div>

Problem has been resolved: Spring Boot has default elasticsearch version below 5.0.0. The solution was by adding properties with version Elasticsearch, which we want to use in application. @dadoonet, thank you very much. You have been right about the conflict of dependencies Spring.

---

<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:** [February 18, 2018, 10:15am UTC](https://discuss.elastic.co/t/class-networkplugin-has-not-found-elasticsearch-6-1-1/116335/7 "2018-02-18T10:15:16Z")

</div>

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