Search fails to start when core uses XML mappings making use of entity-name attribute

Description

As described on forums: https://forum.hibernate.org/viewtopic.php?f=9&t=993687

classes mapped using XML on hibernate core, like
classes starting with:
<class name="com.mydomain.myapp.AnswerImpl" table="answer"
entity-name="Answer">

cause:

Caused by: java.lang.NullPointerException
at org.hibernate.search.cfg.SearchConfigurationFromHibernateCore.getClassMapping(SearchConfigurationFromHibernateCore.java:31)
at org.hibernate.search.store.DirectoryProviderFactory.getDirectoryProviderName(DirectoryProviderFactory.java:226)
at org.hibernate.search.store.DirectoryProviderFactory.createDirectoryProviders(DirectoryProviderFactory.java:53)
at org.hibernate.search.impl.SearchFactoryImpl.initDocumentBuilders(SearchFactoryImpl.java:404)
at org.hibernate.search.impl.SearchFactoryImpl.<init>(SearchFactoryImpl.java:119)
at org.hibernate.search.event.ContextHolder.getOrBuildSearchFactory(ContextHolder.java:30)
at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:59)
at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
... 16 more

This was reported on 3.1.0.GA but I guess it affects all releases.
There's a "test WAR" in the forums, going to ask for a testcase.

Environment

None

Assignee

Unassigned

Reporter

Sanne Grinovero

Labels

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Affects versions

Priority

Major
Configure