# Getting error when try to create embedded elasticseach server. org.elasticsearch.common.settings.Settings.settingsBuilder()Lorg/elasticsearch/common/settings/Settings$Builder;

**URL:** <https://discuss.elastic.co/t/getting-error-when-try-to-create-embedded-elasticseach-server-org-elasticsearch-common-settings-settings-settingsbuilder-lorg-elasticsearch-common-settings-settings-builder/114102>\
**Category:** Elasticsearch\
**Created:** [January 4, 2018, 1:51pm UTC](https://discuss.elastic.co/t/getting-error-when-try-to-create-embedded-elasticseach-server-org-elasticsearch-common-settings-settings-settingsbuilder-lorg-elasticsearch-common-settings-settings-builder/114102 "2018-01-04T13:51:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mansoor67890](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mansoor67890/32/26240_2.png) [@mansoor67890](https://discuss.elastic.co/u/mansoor67890)\
**Post date:** [January 4, 2018, 1:51pm UTC](https://discuss.elastic.co/t/getting-error-when-try-to-create-embedded-elasticseach-server-org-elasticsearch-common-settings-settings-settingsbuilder-lorg-elasticsearch-common-settings-settings-builder/114102/1 "2018-01-04T13:51:25Z")

</div>

Here is my pom:  
  
org.springframework.boot  
spring-boot-starter-parent  
1.5.8.RELEASE

```
<properties>
	<!-- <org.springframework-version>4.2.5.RELEASE</org.springframework-version> 
		<org.aspectj-version>1.6.10</org.aspectj-version> -->
	<org.slf4j-version>1.7.13</org.slf4j-version>
	<jackson.databind-version>2.6.4</jackson.databind-version>
	<elasticsearch.version>1.7.4</elasticsearch.version>
	<springdata-elasticsearch>1.3.1.RELEASE</springdata-elasticsearch>
	<!-- <spring-security-version>4.0.4.RELEASE</spring-security-version> -->
	<hsqldb-version>2.3.4</hsqldb-version>
</properties>

<dependencies>

	<!-- Spring Boot Dependencies -->
	<!-- <dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-aop</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-data-jpa</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-data-rest</artifactId>
	</dependency>
	<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> 
		</dependency> -->
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-security</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-web</artifactId>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-websocket</artifactId>
	</dependency>

	<dependency>
		<groupId>mysql</groupId>
		<artifactId>mysql-connector-java</artifactId>
		<scope>runtime</scope>
	</dependency>

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-test</artifactId>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.springframework.security</groupId>
		<artifactId>spring-security-test</artifactId>
		<scope>test</scope>
	</dependency>
	<!-- Jackson Jar Dependency -->
	<!-- <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> 
		<version>${jackson.databind-version}</version> </dependency> -->
	<!-- Spring -->
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-context</artifactId>
		<exclusions>
			<exclusion>
				<groupId>commons-logging</groupId>
				<artifactId>commons-logging</artifactId>
			</exclusion>
		</exclusions>
	</dependency>

```

Following in elasticsearch config:

```
@Configuration

```

@EnableElasticsearchRepositories(basePackages = "com.tiss.tip.dal.repository")  
@EnableAutoConfiguration(exclude= { ElasticsearchAutoConfiguration.class })  
public class EsConfig implements DisposableBean{

```
@Value("${elasticsearch.host}")
private String EsHost;

@Value("${elasticsearch.port}")
private int EsPort;

@Value("${elasticsearch.clustername}")
private String EsClusterName;

private NodeClient client;

@Bean
public Client client() throws Exception {

    try {
        NodeBuilder nodeBuilder = new NodeBuilder();
        nodeBuilder
                .clusterName(EsClusterName)
                .local(false);
        nodeBuilder.settings()
                .put("http.enabled", true);
        this.client = (NodeClient)nodeBuilder.node().client();
        return this.client;
    }
    catch (Exception ex) {
        throw new IllegalStateException(ex);
    }
}

@Bean
public ElasticsearchOperations elasticsearchTemplate() throws Exception {
    return new ElasticsearchTemplate(client());
}

@Override
public void destroy() throws Exception {
    if (this.client != null) {
        try {
            if (this.client != null) {
                this.client.close();
            }
        }
        catch (final Exception ex) {
        	ex.printStackTrace();
        }
    }
}

```

}

Here is full stacktrace:

> **[View Paste wCQP1](https://paste.ee/p/wCQP1)**
>
> Paste.ee - View Paste wCQP1

  
Kindly help me I am stuck with this issue.  
Thanks.

---

<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:** [January 4, 2018, 2:13pm UTC](https://discuss.elastic.co/t/getting-error-when-try-to-create-embedded-elasticseach-server-org-elasticsearch-common-settings-settings-settingsbuilder-lorg-elasticsearch-common-settings-settings-builder/114102/2 "2018-01-04T14:13:46Z")

</div>

I did not look at the logs but anyway embedding elasticsearch is not supported.

> **[Elasticsearch, the server](https://www.elastic.co/blog/elasticsearch-the-server)**
>
> How Elasticsearch is evolving into a secure, stable, reliable, predictable solution.

---

<div class="post-metadata">

**Author:** ![mansoor67890](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mansoor67890/32/26240_2.png) [@mansoor67890](https://discuss.elastic.co/u/mansoor67890)\
**Post date:** [January 4, 2018, 2:48pm UTC](https://discuss.elastic.co/t/getting-error-when-try-to-create-embedded-elasticseach-server-org-elasticsearch-common-settings-settings-settingsbuilder-lorg-elasticsearch-common-settings-settings-builder/114102/3 "2018-01-04T14:48:08Z")

</div>

Yeah I know but I am using elastic 1.7.4. Can you see at logs and tell me about the problem?

---

<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:** [January 4, 2018, 7:03pm UTC](https://discuss.elastic.co/t/getting-error-when-try-to-create-embedded-elasticseach-server-org-elasticsearch-common-settings-settings-settingsbuilder-lorg-elasticsearch-common-settings-settings-builder/114102/4 "2018-01-04T19:03:16Z")

</div>

Elasticsearch 1.7 is no longer supported.

Use something like Transport Client. If you really need a Node Client, then run an elasticsearch node locally and connect the TransportClient to it. As explained in [https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.4/client-connected-to-client-node.html](https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.4/client-connected-to-client-node.html)

---

<div class="post-metadata">

**Author:** ![mansoor67890](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mansoor67890/32/26240_2.png) [@mansoor67890](https://discuss.elastic.co/u/mansoor67890)\
**Post date:** [January 5, 2018, 4:37am UTC](https://discuss.elastic.co/t/getting-error-when-try-to-create-embedded-elasticseach-server-org-elasticsearch-common-settings-settings-settingsbuilder-lorg-elasticsearch-common-settings-settings-builder/114102/5 "2018-01-05T04:37:21Z")

</div>

ok.  
Thanks.

---

<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:** [February 2, 2018, 4:37am UTC](https://discuss.elastic.co/t/getting-error-when-try-to-create-embedded-elasticseach-server-org-elasticsearch-common-settings-settings-settingsbuilder-lorg-elasticsearch-common-settings-settings-builder/114102/6 "2018-02-02T04:37:25Z")

</div>

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