When I try to get the
FullTextEntityManager I continually get the error below. Anyone know what could be causing this? I'm using Hibernate Search 3.2.0, Hibernate Core & Entity-Manager 3.5.1, Lucene 2.9.2
Quote:
Caused by: java.lang.NullPointerException
at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.getFullTextSession(FullTextEntityManagerImpl.java:62)
at org.hibernate.search.jpa.impl.FullTextEntityManagerImpl.createFullTextQuery(FullTextEntityManagerImpl.java:98)
at com.facility.ws.search.BasicSearch.buildJpaQuery(BasicSearch.java:69)
This is the method were the exception (at the line where static method getFullTextEntityManager() is called):
Code:
public org.hibernate.search.jpa.FullTextQuery buildJpaQuery(org.apache.lucene.search.Query luceneQuery, Class entity) {
FullTextEntityManager ftem = org.hibernate.search.jpa.Search.getFullTextEntityManager(em);
org.hibernate.search.jpa.FullTextQuery query = ftem.createFullTextQuery(luceneQuery, entity);
return query;
}