# IndexMissingException with NodeClient

**URL:** <https://discuss.elastic.co/t/indexmissingexception-with-nodeclient/8568>\
**Category:** Elasticsearch\
**Created:** [July 30, 2012, 7:16pm UTC](https://discuss.elastic.co/t/indexmissingexception-with-nodeclient/8568 "2012-07-30T19:16:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![re92](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@re92](https://discuss.elastic.co/u/re92)\
**Post date:** [July 30, 2012, 7:16pm UTC](https://discuss.elastic.co/t/indexmissingexception-with-nodeclient/8568/1 "2012-07-30T19:16:59Z")

</div>

Hello,

I set up ES and am able to index entries using curl, as mentioned here:

> **[elastic/elasticsearch](https://github.com/elastic/elasticsearch)**
>
> elasticsearch - Open Source, Distributed, RESTful Search Engine

I'm now trying to set up a Java client. For some reason, if I use a  
TransportClient, I am able to properly get entries from ES. However, when I  
use NodeClient, I'm getting an IndexMissingException (stack trace below).

The gist of the code is here:

> <https://gist.github.com/anonymous/3209247>

If I change line 22 to getTransportClient, everything's peachy. Any  
suggestions on what I need to do to get the NodeClient working?

I am on Windows7, and started bin/elasticsearch.bat using the default  
elasticsearch.yml configuration.

Thanks,  
Raj

* * *

Exception in thread "main" org.elasticsearch.indices.IndexMissingException:  
[twitter] missing  
at  
org.elasticsearch.cluster.metadata.MetaData.concreteIndex(MetaData.java:532)  
at  
org.elasticsearch.action.get.TransportGetAction.resolveRequest(TransportGetAction.java:90)  
at  
org.elasticsearch.action.get.TransportGetAction.resolveRequest(TransportGetAction.java:42)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:115)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:95)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:72)  
at  
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:47)  
at  
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)  
at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)  
at  
org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:171)  
at  
org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:135)  
at  
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)  
at  
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)  
at ESTest.main(ESTest.java:26)

---

<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, 3:18am UTC](https://discuss.elastic.co/t/indexmissingexception-with-nodeclient/8568/2 "2017-07-06T03:18:27Z")

</div>


