HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: - Error

Hi,
While working on a Sample Project of Spring boot application fetching data from Elasticsearch DB using Hibernate Search, I had the following error.

 2020-06-27 13:59:34.152 ERROR 48012 --- [rker thread - 2] o.h.s.e.r.spi.RootFailureCollector       : HSEARCH000521: Hibernate Search encountered a failure during bootstrap; continuing for now to list all problems, but the process will ultimately be aborted.
Context: Hibernate ORM mapping, type 'com.personal.hibernate.example.crudapi.model.Employee'
Failure:

org.hibernate.search.util.common.SearchTimeoutException: HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: 'PUT /employee-000001 with parameters {}'.
	at org.hibernate.search.backend.elasticsearch.client.impl.ElasticsearchClientImpl.lambda$send$2(ElasticsearchClientImpl.java:147) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

2020-06-27 13:59:34.208 ERROR 48012 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Could not create JPA EntityManager; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.personal.hibernate.example.crudapi.model.Employee': 
            failures: 
              - HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: 'PUT /employee-000001 with parameters {}'.] with root cause

org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.personal.hibernate.example.crudapi.model.Employee': 
            failures: 
              - HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: 'PUT /employee-000001 with parameters {}'.
	at org.hibernate.search.engine.reporting.spi.RootFailureCollector.checkNoFailure(RootFailureCollector.java:50) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.engine.common.impl.SearchIntegrationPartialBuildStateImpl$SearchIntegrationFinalizerImpl.finalizeIntegration(SearchIntegrationPartialBuildStateImpl.java:172) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.doBootSecondPhase(HibernateOrmIntegrationBooterImpl.java:276) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.bootNow(HibernateOrmIntegrationBooterImpl.java:198) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[na:na]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:41) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:380) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1249) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

2020-06-27 13:59:34.253 ERROR 48012 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] threw exception

org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.personal.hibernate.example.crudapi.model.Employee': 
            failures: 
              - HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: 'PUT /employee-000001 with parameters {}'.
	at org.hibernate.search.engine.reporting.spi.RootFailureCollector.checkNoFailure(RootFailureCollector.java:50) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.engine.common.impl.SearchIntegrationPartialBuildStateImpl$SearchIntegrationFinalizerImpl.finalizeIntegration(SearchIntegrationPartialBuildStateImpl.java:172) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.doBootSecondPhase(HibernateOrmIntegrationBooterImpl.java:276) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.bootNow(HibernateOrmIntegrationBooterImpl.java:198) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[na:na]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:41) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:380) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1249) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

2020-06-27 13:59:34.256 ERROR 48012 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost]           : Exception Processing ErrorPage[errorCode=0, location=/error]

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Could not create JPA EntityManager; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.personal.hibernate.example.crudapi.model.Employee': 
            failures: 
              - HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: 'PUT /employee-000001 with parameters {}'.
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:394) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:253) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:348) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:173) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: org.springframework.dao.DataAccessResourceFailureException: Could not create JPA EntityManager; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.personal.hibernate.example.crudapi.model.Employee': 
            failures: 
              - HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: 'PUT /employee-000001 with parameters {}'.
	at org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor.preHandle(OpenEntityManagerInViewInterceptor.java:97) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:57) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:141) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1035) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 36 common frames omitted
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.personal.hibernate.example.crudapi.model.Employee': 
            failures: 
              - HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: 'PUT /employee-000001 with parameters {}'.
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:403) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	... 1 common frames omitted
Caused by: org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.personal.hibernate.example.crudapi.model.Employee': 
            failures: 
              - HSEARCH400590: Request exceeded the timeout of 60s, 0ms and 0ns: 'PUT /employee-000001 with parameters {}'.
	at org.hibernate.search.engine.reporting.spi.RootFailureCollector.checkNoFailure(RootFailureCollector.java:50) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.engine.common.impl.SearchIntegrationPartialBuildStateImpl$SearchIntegrationFinalizerImpl.finalizeIntegration(SearchIntegrationPartialBuildStateImpl.java:172) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.doBootSecondPhase(HibernateOrmIntegrationBooterImpl.java:276) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.bootNow(HibernateOrmIntegrationBooterImpl.java:198) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[na:na]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:41) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:380) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1249) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 5 common frames omitted

My Entity class is 

package com.personal.hibernate.example.crudapi.model;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;

import javax.persistence.*;
import java.sql.Date;

@Entity
@Indexed
@Table(name="tbl_employee")
@Getter
@Setter
public class Employee {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column
	@GenericField
	private Integer id;
	@Column
	@GenericField
	private String name;
	@Column
	@GenericField
	private String gender;
	@Column
	@GenericField
	private String department;
	@Column
	@GenericField
	private String dob;

	public Employee(int id, String name, String department, String gender, String dob) {
		this.id = id;
		this.name = name;
		this.department = department;
		this.gender = gender;
		this.dob = dob;
	}

	public Employee() {
	}

	@Override
	public String toString() {
		return "Employee [id=" + id + ", name=" + name + ", gender=" + gender + ", department=" + department + ", dob="
				+ dob + "]";
	}
}

Can you please let me know what that error mean? I have checked the datatypes associated with fields in entity class and they are same.

Hi,

The request that creates the index failed due to a timeout.

You should check that your Elasticsearch cluster can be reached and works correctly. The problem is either in your network configuration (locally on your computer, in a router, in an Apache HTTPD proxy, …) or in Elasticsearch itself.

Just approach this like you would approach a connectivity issue with a relational database.

Thanks for reply Yrodiere.
I have run the tcpdump on network interface over port 9200 and could see the traffic on the linux machine where elasticsearch is hosted.

I could see that the status of the cluster is yellow and getting issue while trying to index.

Caused by: org.hibernate.search.util.common.SearchException: HSEARCH400007: Elasticsearch request failed: HSEARCH400010: Elasticsearch connection time-out; check the cluster status, it should be 'green'
Request: GET /_cluster/health/employee-write with parameters {wait_for_status=green, timeout=10000ms}
Response: 408 'Request Timeout' with body 
{
  "cluster_name": "elasticsuva",
  "status": "yellow",
  "timed_out": true,
  "number_of_nodes": 1,
  "number_of_data_nodes": 1,
  "active_primary_shards": 1,
  "active_shards": 1,
  "relocating_shards": 0,
  "initializing_shards": 0,
  "unassigned_shards": 1,
  "delayed_unassigned_shards": 0,
  "number_of_pending_tasks": 0,
  "number_of_in_flight_fetch": 0,
  "task_max_waiting_in_queue_millis": 0,
  "active_shards_percent_as_number": 65.38461538461539
}

	at org.hibernate.search.backend.elasticsearch.work.impl.AbstractNonBulkableWork.handleResult(AbstractNonBulkableWork.java:85) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.backend.elasticsearch.work.impl.AbstractNonBulkableWork.lambda$execute$3(AbstractNonBulkableWork.java:67) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
	... 21 common frames omitted
Caused by: org.hibernate.search.util.common.SearchException: HSEARCH400010: Elasticsearch connection time-out; check the cluster status, it should be 'green'
	at org.hibernate.search.backend.elasticsearch.work.impl.DefaultElasticsearchRequestSuccessAssessor.checkSuccess(DefaultElasticsearchRequestSuccessAssessor.java:100) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.backend.elasticsearch.work.impl.DefaultElasticsearchRequestSuccessAssessor.checkSuccess(DefaultElasticsearchRequestSuccessAssessor.java:86) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.backend.elasticsearch.work.impl.AbstractNonBulkableWork.handleResult(AbstractNonBulkableWork.java:80) ~[hibernate-search-backend-elasticsearch-6.0.0.Beta8.jar:6.0.0.Beta8]
	... 23 common frames omitted

I have added the following properties to my application.properties pertaining to ElasticSearch

spring.data.jest.uri=http://10.54.8.115:9200

# Specify the DirectoryProvider to use (the Lucene Directory)

spring.jpa.properties.hibernate.search.default.directory_provider = filesystem


# Using the filesystem DirectoryProvider you also have to specify the default
# base directory for all indexes (make sure that the application have write
# permissions on such directory)
spring.jpa.properties.hibernate.search.default.indexBase = D:/work/indexes

spring.jpa.properties.hibernate.search.default_backend=elasticsearch 
spring.jpa.properties.hibernate.search.backends.elasticsearch.type=elasticsearch
spring.jpa.properties.hibernate.search.backends.elasticsearch.hosts=10.54.8.115:9200
spring.jpa.properties.hibernate.search.backends.elasticsearch.protocol=http
spring.jpa.properties.hibernate.search.default.elasticsearch.required_index_status=yellow
spring.jpa.properties.hibernate.search.default.elasticsearch.index_management_wait_timeout=60s

spring.jpa.properties.hibernate.search.backends.elasticsearch.request_timeout=90000
spring.jpa.properties.hibernate.search.backends.elasticsearch.connection_timeout=30000
spring.jpa.properties.hibernate.search.backends.elasticsearch.read_timeout=90000

Could you please advise on what should be done to rectify this?

The error occurs on startup; Hibernate Search doesn’t index anything on startup, it just creates the index.

This second error you’ve included in your post means that Elasticsearch couldn’t get the index to reach status “green” in less than 60s. Status “green” means the index is replicated; “yellow” means the index can be used but is not replicated. If you only have one node, the index cannot possibly be replicated, so you cannot reach status “green” and you’ll always get this error.

This can be solved by setting a specific setting to tell Hibernate Search to wait for status “yellow” instead of “green”. I see you have something similar in your settings, but you’re seemingly using incorrect properties. Please keep in mind that settings from Hibernate Search 5 no longer work in Hibernate Search 6. On the latest version of Hibernate Search 6 (6.0.0.Beta8), you should use something like this:

spring.jpa.properties.hibernate.search.backends.elasticsearch.index_defaults.schema_management.minimal_required_status=yellow

See this section of the documentation for more information.

Thank you Mr Yrodiere.
With the provided property, now there is no error seen. I would like to extend my question. I had created an index named “tbl_employee” and had added few data sets (i.e. records). I have the application hosted in

The Entity class has an annotation denoting “@Indexed (index=“tbl_employee”)”

After I run the application, the application is creating an index tbl_employee-000001 which has the aliases tbl_employee-write and tbl_employee-read. and when search to find data from tbl_employee, the query to elasticsearch is going to tbl_employee-read and the hits were empty.

Why is tbl_employee-000001 created. If this is created for indexing then why is the data not getting indexed and there were zero records in tbl_employee.

https://docs.jboss.org/hibernate/search/6.0/reference/en-US/html_single/#backend-elasticsearch-indexlayout

As per the above link I have implemented CustomLayoutStrategy and getting an error as following. Can you please let me know what i am missing to do. My understanding is that, hibernate search creates aliased indexes to read and write, and creating indexes mean I believe indexing the data for searching. And it is creating indexing then, the data should be avaialble. Instead, I see following error.

2020-06-30 15:47:31.266  INFO 24220 --- [nio-8080-exec-9] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-06-30 15:47:31.266  INFO 24220 --- [nio-8080-exec-9] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-06-30 15:47:31.290  INFO 24220 --- [nio-8080-exec-9] o.s.web.servlet.DispatcherServlet        : Completed initialization in 24 ms
2020-06-30 15:47:31.371 ERROR 24220 --- [nio-8080-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Could not create JPA EntityManager; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.hibernate.example.crudapi.model.Employee': 
            alias 'tbl_employee-write': 
                attribute 'is_write_index': 
                    failures: 
                      - Invalid value. Expected 'true', actual is 'null'
            alias 'tbl_employee': 
                failures: 
                  - Missing alias
            attribute 'dynamic': 
                failures: 
                  - Invalid value. Expected 'STRICT', actual is 'null'
            field '_entity_type': 
                failures: 
                  - Missing property mapping
            field 'department': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'dob': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'gender': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'id': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'integer', actual is 'long'
            field 'name': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'] with root cause

org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.hibernate.example.crudapi.model.Employee': 
            alias 'tbl_employee-write': 
                attribute 'is_write_index': 
                    failures: 
                      - Invalid value. Expected 'true', actual is 'null'
            alias 'tbl_employee': 
                failures: 
                  - Missing alias
            attribute 'dynamic': 
                failures: 
                  - Invalid value. Expected 'STRICT', actual is 'null'
            field '_entity_type': 
                failures: 
                  - Missing property mapping
            field 'department': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'dob': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'gender': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'id': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'integer', actual is 'long'
            field 'name': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
	at org.hibernate.search.engine.reporting.spi.RootFailureCollector.checkNoFailure(RootFailureCollector.java:50) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.engine.common.impl.SearchIntegrationPartialBuildStateImpl$SearchIntegrationFinalizerImpl.finalizeIntegration(SearchIntegrationPartialBuildStateImpl.java:172) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.doBootSecondPhase(HibernateOrmIntegrationBooterImpl.java:276) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.bootNow(HibernateOrmIntegrationBooterImpl.java:198) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[na:na]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:41) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:380) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1249) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

2020-06-30 15:47:31.431 ERROR 24220 --- [nio-8080-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] threw exception

org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.hibernate.example.crudapi.model.Employee': 
            alias 'tbl_employee-write': 
                attribute 'is_write_index': 
                    failures: 
                      - Invalid value. Expected 'true', actual is 'null'
            alias 'tbl_employee': 
                failures: 
                  - Missing alias
            attribute 'dynamic': 
                failures: 
                  - Invalid value. Expected 'STRICT', actual is 'null'
            field '_entity_type': 
                failures: 
                  - Missing property mapping
            field 'department': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'dob': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'gender': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'id': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'integer', actual is 'long'
            field 'name': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
	at org.hibernate.search.engine.reporting.spi.RootFailureCollector.checkNoFailure(RootFailureCollector.java:50) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.engine.common.impl.SearchIntegrationPartialBuildStateImpl$SearchIntegrationFinalizerImpl.finalizeIntegration(SearchIntegrationPartialBuildStateImpl.java:172) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.doBootSecondPhase(HibernateOrmIntegrationBooterImpl.java:276) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.bootNow(HibernateOrmIntegrationBooterImpl.java:198) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[na:na]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:41) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:380) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1249) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]

2020-06-30 15:47:31.434 ERROR 24220 --- [nio-8080-exec-9] o.a.c.c.C.[Tomcat].[localhost]           : Exception Processing ErrorPage[errorCode=0, location=/error]

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Could not create JPA EntityManager; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.hibernate.example.crudapi.model.Employee': 
            alias 'tbl_employee-write': 
                attribute 'is_write_index': 
                    failures: 
                      - Invalid value. Expected 'true', actual is 'null'
            alias 'tbl_employee': 
                failures: 
                  - Missing alias
            attribute 'dynamic': 
                failures: 
                  - Invalid value. Expected 'STRICT', actual is 'null'
            field '_entity_type': 
                failures: 
                  - Missing property mapping
            field 'department': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'dob': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'gender': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'id': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'integer', actual is 'long'
            field 'name': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:103) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:394) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:253) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:348) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:173) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: org.springframework.dao.DataAccessResourceFailureException: Could not create JPA EntityManager; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.hibernate.example.crudapi.model.Employee': 
            alias 'tbl_employee-write': 
                attribute 'is_write_index': 
                    failures: 
                      - Invalid value. Expected 'true', actual is 'null'
            alias 'tbl_employee': 
                failures: 
                  - Missing alias
            attribute 'dynamic': 
                failures: 
                  - Invalid value. Expected 'STRICT', actual is 'null'
            field '_entity_type': 
                failures: 
                  - Missing property mapping
            field 'department': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'dob': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'gender': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'id': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'integer', actual is 'long'
            field 'name': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
	at org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor.preHandle(OpenEntityManagerInViewInterceptor.java:97) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.preHandle(WebRequestHandlerInterceptorAdapter.java:57) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:141) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1035) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 36 common frames omitted
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.hibernate.example.crudapi.model.Employee': 
            alias 'tbl_employee-write': 
                attribute 'is_write_index': 
                    failures: 
                      - Invalid value. Expected 'true', actual is 'null'
            alias 'tbl_employee': 
                failures: 
                  - Missing alias
            attribute 'dynamic': 
                failures: 
                  - Invalid value. Expected 'STRICT', actual is 'null'
            field '_entity_type': 
                failures: 
                  - Missing property mapping
            field 'department': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'dob': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'gender': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'id': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'integer', actual is 'long'
            field 'name': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:403) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	... 1 common frames omitted
Caused by: org.hibernate.search.util.common.SearchException: HSEARCH000520: Hibernate Search encountered failures during bootstrap. Failures:

    Hibernate ORM mapping: 
        type 'com.hibernate.example.crudapi.model.Employee': 
            alias 'tbl_employee-write': 
                attribute 'is_write_index': 
                    failures: 
                      - Invalid value. Expected 'true', actual is 'null'
            alias 'tbl_employee': 
                failures: 
                  - Missing alias
            attribute 'dynamic': 
                failures: 
                  - Invalid value. Expected 'STRICT', actual is 'null'
            field '_entity_type': 
                failures: 
                  - Missing property mapping
            field 'department': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'dob': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'gender': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
            field 'id': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'integer', actual is 'long'
            field 'name': 
                attribute 'type': 
                    failures: 
                      - Invalid value. Expected 'keyword', actual is 'text'
	at org.hibernate.search.engine.reporting.spi.RootFailureCollector.checkNoFailure(RootFailureCollector.java:50) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.engine.common.impl.SearchIntegrationPartialBuildStateImpl$SearchIntegrationFinalizerImpl.finalizeIntegration(SearchIntegrationPartialBuildStateImpl.java:172) ~[hibernate-search-engine-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.doBootSecondPhase(HibernateOrmIntegrationBooterImpl.java:276) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateOrmIntegrationBooterImpl.bootNow(HibernateOrmIntegrationBooterImpl.java:198) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[na:na]
	at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[na:na]
	at org.hibernate.search.mapper.orm.bootstrap.impl.HibernateSearchSessionFactoryObserver.sessionFactoryCreated(HibernateSearchSessionFactoryObserver.java:41) ~[hibernate-search-mapper-orm-6.0.0.Beta8.jar:6.0.0.Beta8]
	at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:380) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:468) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1249) ~[hibernate-core-5.4.15.Final.jar:5.4.15.Final]
	at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:391) ~[spring-orm-5.2.6.RELEASE.jar:5.2.6.RELEASE]
	... 4 common frames omitted

Could you please help in correcting my understanding?

The failures you see result from Hibernate Search automatically validating your schema, and finding that parts of this schema do not match what it needs.

The alias you created is not marked as a write alias. You need to specify is_write_index when you create the alias.

The mapping you created should include the attribute "dynamic": "strict".

The mapping you created mentions a field named “id” of type “long”, but Hibernate Search expects type “integer”.

Etc, etc.

If you’re going to create the index and mapping by yourself, I suggest you first let Hibernate Search create one, and then have a look at the schema it creates.

If you didn’t create the mapping yourself, it’s possible it was created automatically by Elasticsearch if you tried to index a document manually (through a request to the REST API).