# ImmutableMap dependancy issue

**URL:** <https://discuss.elastic.co/t/immutablemap-dependancy-issue/42221>\
**Category:** Elasticsearch\
**Created:** [February 19, 2016, 9:10am UTC](https://discuss.elastic.co/t/immutablemap-dependancy-issue/42221 "2016-02-19T09:10:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinushan\_m](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dinushan_m/32/8095_2.png) [@dinushan\_m](https://discuss.elastic.co/u/dinushan_m)\
**Post date:** [February 19, 2016, 9:10am UTC](https://discuss.elastic.co/t/immutablemap-dependancy-issue/42221/1 "2016-02-19T09:10:42Z")

</div>

I get this exception when running a jar on some machines (not on all machines).  
Is this related to elasticsearch or just a issue of creating the jar using maven ?

Exception in thread "Thread-18" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMapValues$1  
at com.google.common.collect.ImmutableMap.values(ImmutableMap.java:423)  
at org.elasticsearch.threadpool.ThreadPool.shutdown(ThreadPool.java:363)  
at org.elasticsearch.threadpool.ThreadPool.terminate(ThreadPool.java:900)  
at org.elasticsearch.client.transport.TransportClient$Builder.build(TransportClient.java:165)  
....  
....  
at java.lang.Thread.run(Thread.java:745)

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [February 19, 2016, 3:18pm UTC](https://discuss.elastic.co/t/immutablemap-dependancy-issue/42221/2 "2016-02-19T15:18:04Z")

</div>

> [@dinushan\_m](#):
>
> I get this exception when running a jar on some machines (not on all machines). Is this related to elasticsearch or just a issue of creating the jar using maven ?

It is really hard to tell without more information. Like, how did you get the jar? You built it with maven. Is it 2.x? What is your lib path, etc. For the most part Elasticsearch is only really going to work well if you run it using one of the distributions.

---

<div class="post-metadata">

**Author:** ![dinushan\_m](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dinushan_m/32/8095_2.png) [@dinushan\_m](https://discuss.elastic.co/u/dinushan_m)\
**Post date:** [February 19, 2016, 4:16pm UTC](https://discuss.elastic.co/t/immutablemap-dependancy-issue/42221/3 "2016-02-19T16:16:54Z")

</div>

thanks you for your answer. I was mislead with the exception (and heard of ES shading etc..). It was a maven issue. that package was not properly created

---

<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:** [July 5, 2017, 11:14pm UTC](https://discuss.elastic.co/t/immutablemap-dependancy-issue/42221/4 "2017-07-05T23:14:49Z")

</div>


