Exception :Configuration properties changed between Hibernate Search 5 and Hibernate Search 6

Viewed 75

We are getting below exception on application startup. Any reason why we are getting this? We have already specified Hibernate Search 6 specific properties and elasticsearch 7.10?

application.yaml  => code snippet

     search:
          enabled: true
          backend:
            type: elasticsearch
            dynamic_mapping: true
            uris: "http://xxx_elasticsearch:9200"
            
            schema_management:
              minimal_required_status: yellow
          schema_management:
            strategy: none

Note: Application is up and running for other profile.It only gives error for the one of the profile when we used to create multi container environments on local using docker-compose up command

Exception :

Unable to build Hibernate SessionFactory; nested exception is org.hibernate.search.util.common.SearchException: HSEARCH000573: Invalid configuration passed to Hibernate Search: some properties in the given configuration are obsolete.Configuration properties changed between Hibernate Search 5 and Hibernate Search 6 Check out the reference documentation and upgrade your configuration. Obsolete properties: [hibernate.search.default.elasticsearch.index_schema_management_strategy, hibernate.search.default.elasticsearch.required_index_status, hibernate.search.default.elasticsearch.dynamic_mapping, hibernate.search.default.elasticsearch.host].","tid":1}
1 Answers

Any reason why we are getting this?

It's right there in the error message:

Configuration properties changed between Hibernate Search 5 and Hibernate Search 6


We have already specified Hibernate Search 6 specific properties

That's good, but you must also remove the Hibernate Search 5 properties listed in the error message. As a safety measure, Hibernate Search 6 won't start if you leave Hibernate Search 5 configuration properties around, in case you forgot to migrate part of your configuration.

I don't see the Hibernate Search 5 properties in the snippet of configuration you gave, so I assume your snippet doesn't show everything.

Related