# ElasticStore throws exception

**URL:** <https://discuss.elastic.co/t/elasticstore-throws-exception/10117>\
**Category:** Elasticsearch\
**Created:** [December 19, 2012, 5:12am UTC](https://discuss.elastic.co/t/elasticstore-throws-exception/10117 "2012-12-19T05:12:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janusz\_Dalecki](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Janusz\_Dalecki](https://discuss.elastic.co/u/Janusz_Dalecki)\
**Post date:** [December 19, 2012, 5:12am UTC](https://discuss.elastic.co/t/elasticstore-throws-exception/10117/1 "2012-12-19T05:12:41Z")

</div>

Hi Everybody,

I am wondering if you can help me with the following problem:  
I am invoking the constructor of ElasticStore class in subclass of ServletContextListener under Tomcat: like this:  
**ElasticStore es = new ElasticStore(globalIndexName, /\* forceIndexReinit, \*/indexedClasses);**  
and it throws me an exception:  
_SEVERE: Exception sending context initialized event to listener instance of class com.tycoint.eams.servlet.InitContextListener  
org.elasticsearch.discovery.MasterNotDiscoveredException: waited for [30s]  
at org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)  
at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:356)  
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662_

What am I doing wrong?  
Regards,  
Janusz

---

<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 6, 2017, 2:59am UTC](https://discuss.elastic.co/t/elasticstore-throws-exception/10117/2 "2017-07-06T02:59:21Z")

</div>

Closed on July 6, 2017, 2:59am UTC


