# Getting An issue by Saying Cluster nodes source must not be null or empty after upgrading Spring Boot 2.1.7

**URL:** <https://discuss.elastic.co/t/getting-an-issue-by-saying-cluster-nodes-source-must-not-be-null-or-empty-after-upgrading-spring-boot-2-1-7/196253>\
**Category:** Elasticsearch\
**Created:** [August 22, 2019, 7:10am UTC](https://discuss.elastic.co/t/getting-an-issue-by-saying-cluster-nodes-source-must-not-be-null-or-empty-after-upgrading-spring-boot-2-1-7/196253 "2019-08-22T07:10:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shradha\_Bharti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shradha_bharti/32/45398_2.png) [@Shradha\_Bharti](https://discuss.elastic.co/u/Shradha_Bharti)\
**Post date:** [August 22, 2019, 7:10am UTC](https://discuss.elastic.co/t/getting-an-issue-by-saying-cluster-nodes-source-must-not-be-null-or-empty-after-upgrading-spring-boot-2-1-7/196253/1 "2019-08-22T07:10:14Z")

</div>

HI  
I am trying to upgrade my Spring boot application 2.1.7, we have used elastic search over there , while upgrading I am getting below issue  
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticsearchClient' defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method 'elasticsearchClient' threw exception; nested exception is java.lang.IllegalArgumentException: Cluster nodes source must not be null or empty!  
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method 'elasticsearchClient' threw exception; nested exception is java.lang.IllegalArgumentException: Cluster nodes source must not be null or empty!  
Caused by: java.lang.IllegalArgumentException: Cluster nodes source must not be null or empty!

my pom file is  
  
org.springframework.boot  
spring-boot-starter-parent  
2.1.7.RELEASE

```
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>
		
	<dependency>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-starter-config</artifactId>
	</dependency>

</dependencies>

<dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-dependencies</artifactId>
			<version>${spring-cloud.version}</version>
			<type>pom</type>
			<scope>import</scope>
		</dependency>
	</dependencies>
</dependencyManagement>
```

---

<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:** [August 22, 2019, 8:25am UTC](https://discuss.elastic.co/t/getting-an-issue-by-saying-cluster-nodes-source-must-not-be-null-or-empty-after-upgrading-spring-boot-2-1-7/196253/2 "2019-08-22T08:25:51Z")

</div>

Welcome!

May be not your issue but when using springboot with  
elasticsearch, you need to be explicit with some transitive dependencies as SpringBoot declares a version 6.4...

Basically you can put this in your `pom.xml`:

```auto
<properties>
  <elasticsearch.version>7.3.0<elasticsearch.version>
</properties>

```

See documentation here: [https://docs.spring.io/spring-boot/docs/current/reference/html/howto-build.html#howto-customize-dependency-versions](https://docs.spring.io/spring-boot/docs/current/reference/html/howto-build.html#howto-customize-dependency-versions)

---

<div class="post-metadata">

**Author:** ![Shradha\_Bharti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shradha_bharti/32/45398_2.png) [@Shradha\_Bharti](https://discuss.elastic.co/u/Shradha_Bharti)\
**Post date:** [August 22, 2019, 9:16am UTC](https://discuss.elastic.co/t/getting-an-issue-by-saying-cluster-nodes-source-must-not-be-null-or-empty-after-upgrading-spring-boot-2-1-7/196253/3 "2019-08-22T09:16:45Z")

</div>

> [@dadoonet](#):
>
> 7.3.0

HI  
Thanks for your quick response ,but I added elasticSearch version as well ,  
I included 6.2.2 as Spring boot 2.1.7 support elastic Search 6.2.2  
  
\<elasticsearch.version\>6.2.2\</elasticsearch.version\>  
  
,but after That I am getting noClassDefFound Error  
see the below error  
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'elasticsearchClient' defined in class path resource [org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method 'elasticsearchClient' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.elasticsearch.client.ClusterNodes  
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method 'elasticsearchClient' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.elasticsearch.client.ClusterNodes  
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.elasticsearch.client.ClusterNodes

---

<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:** [August 22, 2019, 9:57am UTC](https://discuss.elastic.co/t/getting-an-issue-by-saying-cluster-nodes-source-must-not-be-null-or-empty-after-upgrading-spring-boot-2-1-7/196253/4 "2019-08-22T09:57:55Z")

</div>

This class `org.springframework.data.elasticsearch.client.ClusterNodes` does not come from elasticsearch. May be you're missing spring data elasticsearch?

---

<div class="post-metadata">

**Author:** ![Shradha\_Bharti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shradha_bharti/32/45398_2.png) [@Shradha\_Bharti](https://discuss.elastic.co/u/Shradha_Bharti)\
**Post date:** [August 22, 2019, 10:09am UTC](https://discuss.elastic.co/t/getting-an-issue-by-saying-cluster-nodes-source-must-not-be-null-or-empty-after-upgrading-spring-boot-2-1-7/196253/5 "2019-08-22T10:09:21Z")

</div>

> [@dadoonet](#):
>
> `sticsearch.client.ClusterNodes` does not come from elasticsearch. May be you're missing spring data elasticsearch?

spring-boot-starter-data-elasticsearch internally uses spring data elasticSearch  
see the compile dependencies  
[https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-elasticsearch/2.1.7.RELEASE](https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-elasticsearch/2.1.7.RELEASE)

---

<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:** [September 19, 2019, 10:09am UTC](https://discuss.elastic.co/t/getting-an-issue-by-saying-cluster-nodes-source-must-not-be-null-or-empty-after-upgrading-spring-boot-2-1-7/196253/6 "2019-09-19T10:09:22Z")

</div>

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