Connect Hibernate Search 6.1.5.Final + Elasticsearch 8.2.X using Token based authentication

To give a feedback to this topic https://discourse.hibernate.org/t/connect-hibernate-search-6-1-5-final-elasticsearch-8-2-x-using-a-token/6393

I configured the underlying Apache HTTP Client by implementing ElasticsearchAnalysisConfigurer with Spring Boot application as described in https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#backend-elasticsearch-configuration-http-client

The config files looks like :

image

My costum client :

It works well when connecting to an elasticsearch 8.2.x running in local host but it can’t reach a remote elasticsearch :

Am I missing something in the documentation?

Thank you in advance!

You seem to have hit a NullPointerException, which could be in the Hibernate Search code (I hope not!) or in your own.

Look for NullPointerException in your logs. You should see a stack trace before the one you posted: that’s the one giving all the details.

EDIT: Also, upgrading to JDK 17 would help, as NullPointerException gives much more sensible exception messages in that version.

1 Like