When we find an @IndexedEmbedded, we use introspection to find out exactly what is "embedded". This makes sense, since @IndexedEmbedded is about embedding stuff, right?
Well, not always. The @IndexedEmbedded annotation has another meaning: when there is a @Field on the annotated property, we actually use it to tell Hibernate Search to wrap the field bridge in a "container" field bridge (see HSEARCH-2554 Closed ). This is especially useful when one wants to index a list or array of simple values, such as String or Integer for instance.
Since we cannot distinguish between the two use cases, we end up always using introspection on the element type, even if the element type is something like java.lang.Integer.
This is fine in JDK8 and below, but starting from JDK9 such things are prevented by module isolation: you can't use setAccessible outside of your own module unless explicitly allowed to, and thus you can't inspect private members by default.