hibernate-search MassIndexer ERROR
<p>I would like to reindex entities in elasticsearch index with <code>MassIndexer</code> system from hibernate-search-orm project. </p>

<p>It could be great ;) but it tells me some exceptions.</p>

<p>However as you can see below, example is basic:</p>

<ol>
<li><p>the entity:</p>

<pre><code>@Entity
@Table(name = "STUDENT")
@Indexed
@ProvidedId (bridge = @FieldBridge(impl = StudentFieldBridge.class))
public class StudentEntity {

    @EmbeddedId
    private RegistrationId regid;

    @Field
    private String name;
    ...
}
</code></pre></li>
<li><p>the <code>registrationId</code>:</p>

<pre><code>@Embeddable
public class RegistrationId implements Serializable{

    @Column(name = "STUDENT_ID")
    private int studentId;

    @Column(name = "DEPARTMENT")
    private String department;
    ...
}
</code></pre></li>
<li><p>the student field bridge:</p>

<pre><code>public class StudentFieldBridge implements TwoWayStringBridge {

    @Override
    public Object stringToObject(String stringValue) {
        String[] split = stringValue.split("_");
        RegistrationId ret = new RegistrationId();
        ret.setDepartment(split[0]);
        ret.setStudentId(Integer.parseInt(split[1]));
        return ret;
    }

    @Override
    public String objectToString(Object object) {
        RegistrationId id = (RegistrationId) object;
        return id.getDepartment() + "_" + id.getStudentId();
    }
}
</code></pre></li>
<li><p>the mass indexation</p>

<pre><code>@Test
public void massIndexation() throws InterruptedException {
    EntityManager em = Persistence.createEntityManagerFactory("studentPu").createEntityManager();
    org.hibernate.Session hibernateSession = (Session)em.getDelegate();
    FullTextSession fullTextSession = Search.getFullTextSession(hibernateSession);
    fullTextSession.createIndexer().startAndWait();
}   
</code></pre></li>
<li><p>and finally the error : </p>

<pre><code>ERROR: HSEARCH000058: HSEARCH000212: An exception occurred while the MassIndexer was transforming identifiers to Lucene Documents
java.lang.NullPointerException
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getEntityName(CriteriaQueryTranslator.java:626)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns(CriteriaQueryTranslator.java:509)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.findColumns(CriteriaQueryTranslator.java:525)
at org.hibernate.criterion.InExpression.toSqlString(InExpression.java:43)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:400)
at org.hibernate.loader.criteria.CriteriaJoinWalker.&lt;init&gt;(CriteriaJoinWalker.java:106)
at org.hibernate.loader.criteria.CriteriaJoinWalker.&lt;init&gt;(CriteriaJoinWalker.java:75)
at org.hibernate.loader.criteria.CriteriaLoader.&lt;init&gt;(CriteriaLoader.java:80)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1760)
at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:363)
at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadList(IdentifierConsumerDocumentProducer.java:175)
at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadAllFromQueue(IdentifierConsumerDocumentProducer.java:140)
at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.run(IdentifierConsumerDocumentProducer.java:117)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
</code></pre></li>
</ol>

<p>java project dependencies are :</p>

<pre><code>testCompile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.0.8.Final'
testCompile group: 'org.hibernate', name: 'hibernate-search-orm', version: '5.6.0.Alpha3'
testCompile group: 'org.hibernate', name: 'hibernate-search-backend-elasticsearch', version: '5.6.0.Alpha3'
</code></pre>

<p>Thanks to project team for your job !</p>