Spring Boot hangs while trying to retrieve (built-in) beans for Hibernate Search

Description

When attempting to upgrade my projects dependencies to the latest, I noticed that my applications with Hibernate Search 6 Beta were no longer starting up but rather hanging.

In order to trouble shoot the issue, I created a bare bones Spring Boot application and reproduced the issue.
https://github.com/loesak/hibernate-search-hang-issue-proof

I have not yet been able to figure out the cause of the issue.

Environment

OpenJDK 11.0.9
PostgreSQL Server 10.10
Elasticsearch 7.1.1
Spring Boot 2.3.5
Hibernate 5.4.2.FINAL
Hibernate Search 6.0.0.Beta11

Activity

Show:
Yoann Rodière
November 4, 2020, 3:29 PM

Glad this helped.

I had to fix a few things with my configuration and force the version of Elasticsearch client that Spring Boot brings in to 7.9.0 as there were methods being used that don’t exist in 7.6.2.

Yep, that's mentioned here: https://docs.jboss.org/hibernate/search/6.0/reference/en-US/html_single/#_spring_boot
Probably not very visible in that big wall of text, but well... There are lots of other things to say.

Aaron Loes
November 4, 2020, 4:23 PM

Sorry, I clearly missed that when going through the docs yesterday. I’m embarking on upgrading from Beta2 to Beta11.

Aaron Loes
November 4, 2020, 4:26 PM

Since this seems to be an issue with Spring Boot, feel free to close this ticket if you feel its necessary.

Yoann Rodière
November 4, 2020, 4:58 PM

Since this seems to be an issue with Spring Boot, feel free to close this ticket if you feel its necessary.

No, you were right to report it (thank you!), and I want to try a workaround.

While it's true that it's an issue in Spring Boot, I think that in a perfect world, applications that do not rely on injecting custom Spring beans into Hibernate Search should not be affected by this issue. The fact that they currently are is the result of how Hibernate Search deals with beans, and we may be able to change that.

Yoann Rodière
November 4, 2020, 5:00 PM

Sorry, I clearly missed that when going through the docs yesterday. I’m embarking on upgrading from Beta2 to Beta11.

Might as well upgrade to CR1 directly: it was released today https://in.relation.to/2020/11/04/hibernate-search-6-0-0-CR1/

Fixed

Assignee

Yoann Rodière

Reporter

Aaron Loes

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Fix versions

Affects versions

Priority

Major
Configure