# Error while using elastic search while creating a osgi bundle

**URL:** <https://discuss.elastic.co/t/error-while-using-elastic-search-while-creating-a-osgi-bundle/15576>\
**Category:** Elasticsearch\
**Created:** [February 4, 2014, 5:15am UTC](https://discuss.elastic.co/t/error-while-using-elastic-search-while-creating-a-osgi-bundle/15576 "2014-02-04T05:15:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sidharthan](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sidharthan](https://discuss.elastic.co/u/Sidharthan)\
**Post date:** [February 4, 2014, 5:15am UTC](https://discuss.elastic.co/t/error-while-using-elastic-search-while-creating-a-osgi-bundle/15576/1 "2014-02-04T05:15:15Z")

</div>

created a wrapper for elastic search. it working fine while running as java  
application. But while i create OSGI bundle it throwing a error.

_Errror_:  
org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve  
config path [names.txt], tried file path [names.txt], path file  
[/home/local/user/sidharthan.r/config/names.txt], and classpath  
at org.elasticsearch.env.Environment.resolveConfig(Environment.java:207)  
at  
org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:118)  
at  
org.elasticsearch.client.transport.TransportClient.(TransportClient.java:154)  
at  
org.elasticsearch.client.transport.TransportClient.(TransportClient.java:120)  
at  
com.payoda.commons.elasticsearch.util.GenericEsSearch.getES(GenericEsSearch.java:54)

if i copy names.txt file from elasticsearch.jar to path [/home/local/user/sidharthan.r/config/names.txt]  
it working fine.. But how to change default path to custom path or how can  
i point out the names.txt inside elasticsearch.jar/config/names.txt

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3ba0a3f7-6316-4f0a-9ea1-266cdab9f221%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3ba0a3f7-6316-4f0a-9ea1-266cdab9f221%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 6, 2014, 10:10am UTC](https://discuss.elastic.co/t/error-while-using-elastic-search-while-creating-a-osgi-bundle/15576/2 "2014-02-06T10:10:04Z")

</div>

Hey,

i dont have an awful lot of osgi experience, but a valid workaround might  
be to set the "node.name" setting by yourself, when initializing the  
TransportClient, as this should prevent trying to load the names.txt file

--Alex

On Tue, Feb 4, 2014 at 6:15 AM, Gowtham Sidharth [sidharthancrt@gmail.com](mailto:sidharthancrt@gmail.com)wrote:

> created a wrapper for Elasticsearch. it working fine while running as  
> java application. But while i create OSGI bundle it throwing a error.
> 
> _Errror_:  
> org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve  
> config path [names.txt], tried file path [names.txt], path file  
> [/home/local/user/sidharthan.r/config/names.txt], and classpath  
> at org.elasticsearch.env.Environment.resolveConfig(Environment.java:207)  
> at  
> org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:118)  
> at  
> org.elasticsearch.client.transport.TransportClient.(TransportClient.java:154)  
> at  
> org.elasticsearch.client.transport.TransportClient.(TransportClient.java:120)  
> at  
> com.payoda.commons.elasticsearch.util.GenericEsSearch.getES(GenericEsSearch.java:54)
> 
> if i copy names.txt file from elasticsearch.jar to path [/home/local/user/sidharthan.r/config/names.txt]  
> it working fine.. But how to change default path to custom path or how can  
> i point out the names.txt inside elasticsearch.jar/config/names.txt
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/3ba0a3f7-6316-4f0a-9ea1-266cdab9f221%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3ba0a3f7-6316-4f0a-9ea1-266cdab9f221%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-b0vvWj0OiFF%2BoQV4b9W\_1xk5Xh4fhAKRuXxXNpE2Csg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-b0vvWj0OiFF%2BoQV4b9W_1xk5Xh4fhAKRuXxXNpE2Csg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Sidharthan](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Sidharthan](https://discuss.elastic.co/u/Sidharthan)\
**Post date:** [February 6, 2014, 10:16am UTC](https://discuss.elastic.co/t/error-while-using-elastic-search-while-creating-a-osgi-bundle/15576/3 "2014-02-06T10:16:02Z")

</div>

If i create one node means it easy to mention name to node. But, In multi  
node Environment, i need to create more than one node. That time i cant  
mention node name to TransportClient each time. Please Suggest me some  
thing else.

Many Thanks,  
Sidharthan C R

On Thu, Feb 6, 2014 at 3:40 PM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de) wrote:

> Hey,
> 
> i dont have an awful lot of osgi experience, but a valid workaround might  
> be to set the "node.name" setting by yourself, when initializing the  
> TransportClient, as this should prevent trying to load the names.txt file
> 
> --Alex
> 
> On Tue, Feb 4, 2014 at 6:15 AM, Gowtham Sidharth [sidharthancrt@gmail.com](mailto:sidharthancrt@gmail.com)wrote:
> 
> > created a wrapper for Elasticsearch. it working fine while running as  
> > java application. But while i create OSGI bundle it throwing a error.
> > 
> > _Errror_:  
> > org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve  
> > config path [names.txt], tried file path [names.txt], path file  
> > [/home/local/user/sidharthan.r/config/names.txt], and classpath  
> > at org.elasticsearch.env.Environment.resolveConfig(Environment.java:207)  
> > at  
> > org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:118)  
> > at  
> > org.elasticsearch.client.transport.TransportClient.(TransportClient.java:154)  
> > at  
> > org.elasticsearch.client.transport.TransportClient.(TransportClient.java:120)  
> > at  
> > com.payoda.commons.elasticsearch.util.GenericEsSearch.getES(GenericEsSearch.java:54)
> > 
> > if i copy names.txt file from elasticsearch.jar to path [/home/local/user/sidharthan.r/config/names.txt]  
> > it working fine.. But how to change default path to custom path or how can  
> > i point out the names.txt inside elasticsearch.jar/config/names.txt
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/3ba0a3f7-6316-4f0a-9ea1-266cdab9f221%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3ba0a3f7-6316-4f0a-9ea1-266cdab9f221%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/pVECqHOr9Gc/unsubscribe](https://groups.google.com/d/topic/elasticsearch/pVECqHOr9Gc/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-b0vvWj0OiFF%2BoQV4b9W\_1xk5Xh4fhAKRuXxXNpE2Csg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-b0vvWj0OiFF%2BoQV4b9W_1xk5Xh4fhAKRuXxXNpE2Csg%40mail.gmail.com)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALJ\_DUgwpmFsF\_sD\_E%3D%2BmiwGVx2TPTTiC1iVD9CrUr5j\_bs8ig%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALJ_DUgwpmFsF_sD_E%3D%2BmiwGVx2TPTTiC1iVD9CrUr5j_bs8ig%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:52am UTC](https://discuss.elastic.co/t/error-while-using-elastic-search-while-creating-a-osgi-bundle/15576/4 "2017-07-06T01:52:06Z")

</div>


