Missing Bean when using Hibernate Search as Jar?

I confirm something is probably wrong with your setup.

The core of the problem is this:

Caused by: org.hibernate.search.engine.environment.bean.spi.BeanNotFoundException: HSEARCH000578: No
 beans defined for type 'org.hibernate.search.mapper.orm.coordination.common.spi.CoordinationStrateg
y' and name 'none' in Hibernate Search's internal registry.

Hibernate Search has an internal registry of (named) beans that should always be available, and in your case some beans that should be there seem to be missing.

The way this particular bean get registered is through the class org.hibernate.search.mapper.orm.impl.HibernateOrmBeanConfigurer, which should get loaded automatically through the service-loader thanks to the file META-INF/services/org.hibernate.search.engine.environment.bean.spi.BeanConfigurer which you can find in the hibernate-search-mapper-orm JAR.

If I had to guess, I would say that when you say “I export it to a jar file”, you are somehow shading all libraries into your JAR (putting all classes and resources into the same JAR), and for some reason the thing that does the shading does not correctly concatenate files in META-INF/services, but instead just takes one at random. Am I right?

If I’m wrong, I would suggest running the application with that “generate JAR” in debug mode and putting a breakpoint in org.hibernate.search.engine.environment.bean.impl.BeanResolverImpl#create to see what’s going on (which BeanConfigurer instances are found, in particular).