# Configuration error spring-elasticsearch

**URL:** https://discuss.elastic.co/t/configuration-error-spring-elasticsearch/11207
**Category:** Elasticsearch
**Created:** [March 19, 2013, 2:30pm UTC](https://discuss.elastic.co/t/configuration-error-spring-elasticsearch/11207 "2013-03-19T14:30:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yahia](https://avatars.discourse-cdn.com/v4/letter/y/d9b06d/32.png) [@yahia](https://discuss.elastic.co/u/yahia)
#### Post date: [March 19, 2013, 2:30pm UTC](https://discuss.elastic.co/t/configuration-error-spring-elasticsearch/11207/1 "2013-03-19T14:30:13Z")

</div>

hi all,  
I have a problem when configuring a transport client with spring-  
elasticsearch,in my web application I created a node and from which it  
creates a client,

using the following configuration \<elasticsearch:node id="esNode" /\>  
\<elasticsearch:client node=  
"esNode" id="esClient" /\>

with this configuration the node created by the application hold data, and  
NOW I do not want my application store data, it just connects to a cluster  
already exists,

so I want a transport client, and I changed the old configuration by : _\<elasticsearch:client  
id="esClient" /\>_, but i have this error when i start up server : normally  
it is the right configuration but I do not know this error where it comes :

2013-03-19 15:08:10 1 [localhost-startStop-1] ERROR  
org.springframework.web.context.ContextLoader - Context initialization  
failed  
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected  
exception parsing XML document from file  
[C:\Users\hp\workspacePFE.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nLooker\WEB-INF\classes\META-INF\spring\applicationContext.xml];  
nested exception is java.lang.RuntimeException: Incorrect settings. You  
must set esNodes when creating a transport client.  
at  
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)  
at  
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)  
at  
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)  
at  
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)  
at  
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)  
at  
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)  
at  
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)  
at  
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)  
at  
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)  
at  
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)  
at  
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)  
at  
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)  
at  
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)  
at  
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)  
at  
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4790)  
at  
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5284)  
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)  
at  
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)  
at  
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)  
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)  
at java.util.concurrent.FutureTask.run(FutureTask.java:138)  
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)  
Caused by: java.lang.RuntimeException: Incorrect settings. You must set  
esNodes when creating a transport client.  
at  
fr.pilato.spring.elasticsearch.xml.ClientBeanDefinitionParser.parse(ClientBeanDefinitionParser.java:38)  
at  
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)  
at  
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335)  
at  
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)  
at  
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)  
at  
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)  
at  
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)  
at  
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)

--  
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).  
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, 2:45am UTC](https://discuss.elastic.co/t/configuration-error-spring-elasticsearch/11207/2 "2017-07-06T02:45:47Z")

</div>


