1 Reply Latest reply on May 17, 2016 6:04 AM by Panagiotis Chavariotis

    Getting Started with JBoss EAP 6.4 and Hibernate Search - not working ?

    Terry Paterson Newbie

      I've followed the getting started guide for Hibernate Search,


      added the following properties to my persistence.xml


               <property name="hibernate.search.default.directory_provider" value="filesystem"/>

               <property name="hibernate.search.default.indexBase" value="/temp/lucene"/>


      added @Indexed and @Field annotations to some entities


      AND - written a few lines to initially create the index :


               final FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(em);

               final MassIndexer indexer = fullTextEntityManager.createIndexer();




      However -- when I attempt to run the above code to create the index - I still get the following exception :


      javax.ejb.EJBException: org.hibernate.HibernateException: Hibernate Search Event listeners not configured, please check the reference documentation and the application's hibernate.cfg.xml


      I can set the Event Listeners manually in the persistence.xml (although everything I've read seems to suggest I shouldn't need to) :


                  <property name="hibernate.ejb.event.post-insert" value="org.hibernate.search.event.impl.FullTextIndexEventListener"/>

                  <property name="hibernate.ejb.event.post-update" value="org.hibernate.search.event.impl.FullTextIndexEventListener"/>

                  <property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.impl.FullTextIndexEventListener"/>



      But - then I just get a NullPointerException while trying to invoke : fullTextEntityManager.createIndexer();






      does anyone know if there's a problem with getting Hibernate Search to work under EAP 6.4 ?