# Elasticsearch 5 junit hamcrest jar hell

**URL:** <https://discuss.elastic.co/t/elasticsearch-5-junit-hamcrest-jar-hell/69985>\
**Category:** Elasticsearch\
**Created:** [December 26, 2016, 9:08am UTC](https://discuss.elastic.co/t/elasticsearch-5-junit-hamcrest-jar-hell/69985 "2016-12-26T09:08:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvj](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jvj](https://discuss.elastic.co/u/jvj)\
**Post date:** [December 26, 2016, 9:08am UTC](https://discuss.elastic.co/t/elasticsearch-5-junit-hamcrest-jar-hell/69985/1 "2016-12-26T09:08:16Z")

</div>

I'm trying to run integration tests with Elasticsearch 5 and randomizedtests. However I get jar hell error with junit-4.10 and hamcrest-all-1.3. This post [Jar Hell when staring integration test](https://discuss.elastic.co/t/jar-hell-when-staring-integration-test/41885) suggests to exclude hamcrest-all, which I did, but then running Elasticsearch fails with java.lang.NoClassDefFoundError: org/hamcrest/Matchers. What to do?

---

<div class="post-metadata">

**Author:** ![jvj](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jvj](https://discuss.elastic.co/u/jvj)\
**Post date:** [December 26, 2016, 9:14am UTC](https://discuss.elastic.co/t/elasticsearch-5-junit-hamcrest-jar-hell/69985/2 "2016-12-26T09:14:22Z")

</div>

Found a solution. Removing lucene-test-framework from the dependencies helped.

---

<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:** [January 23, 2017, 9:14am UTC](https://discuss.elastic.co/t/elasticsearch-5-junit-hamcrest-jar-hell/69985/3 "2017-01-23T09:14:23Z")

</div>

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