Error creating bean with name ‘entityManagerFactory’ defined in class path resource

I believe the NPE was replaced with a more explicit error message in Hibernate Search 6.0.0.Beta11 (HSEARCH-4025).

One possible cause: you’re trying to put @Indexed on an entity with an @IdClass. Entities with @IdClass cannot be mapped “as-is”; they are a bit more complicated than regular entities.

I recommend switching from from @IdClass to @EmbeddedId, then applying a custom identifier bridge on your ID property as explained here.

Alternatively, if you really need to stick with @IdClass, you can solve the problem by picking a unique property in your entity and annotating it with @DocumentId. What that property will contain is up to you, but it must be unique.