# How to use ESIntegTestCase in elasticsearch 5.6.3

**URL:** <https://discuss.elastic.co/t/how-to-use-esintegtestcase-in-elasticsearch-5-6-3/104787>\
**Category:** Elasticsearch\
**Created:** [October 22, 2017, 4:22am UTC](https://discuss.elastic.co/t/how-to-use-esintegtestcase-in-elasticsearch-5-6-3/104787 "2017-10-22T04:22:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tavandung12](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@tavandung12](https://discuss.elastic.co/u/tavandung12)\
**Post date:** [October 22, 2017, 4:22am UTC](https://discuss.elastic.co/t/how-to-use-esintegtestcase-in-elasticsearch-5-6-3/104787/1 "2017-10-22T04:22:35Z")

</div>

Hi,  
When I run the source code:

```java
public class Mytests extends ESIntegTestCase {

  @Override
  protected Settings nodeSettings(int nodeOrdinal) {
      return Settings.builder().put(super.nodeSettings(nodeOrdinal))
             .put("node.mode", "network")
             .build();
  }

}

```

I get an error:

```java
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.test.ESTestCase
	at java.lang.Thread.run(Thread.java:745)
	Suppressed: java.lang.IllegalStateException: No context information for thread: Thread[id=12, name=Thread-1, state=RUNNABLE, group=TGRP-Mytests]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).
		at com.carrotsearch.randomizedtesting.RandomizedContext.context(RandomizedContext.java:248)
		at com.carrotsearch.randomizedtesting.RandomizedContext.current(RandomizedContext.java:134)
		at com.carrotsearch.randomizedtesting.RandomizedRunner.augmentStackTrace(RandomizedRunner.java:1872)
		at com.carrotsearch.randomizedtesting.RunnerThreadGroup.uncaughtException(RunnerThreadGroup.java:20)
		at java.lang.Thread.dispatchUncaughtException(Thread.java:1952)

```

How to fix this error?

---

<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:** [October 22, 2017, 6:35am UTC](https://discuss.elastic.co/t/how-to-use-esintegtestcase-in-elasticsearch-5-6-3/104787/2 "2017-10-22T06:35:05Z")

</div>

It’s written in the message.

Add Log4J2

---

<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:** [November 19, 2017, 6:35am UTC](https://discuss.elastic.co/t/how-to-use-esintegtestcase-in-elasticsearch-5-6-3/104787/3 "2017-11-19T06:35:09Z")

</div>

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