10 Replies Latest reply on Feb 26, 2013 10:19 AM by Scott Marlow

    Hibernate Search 4.1: Event listeners not configured

    mbickel Newbie

      After I configured Hibernate Search 4 to run as a module (see this thread), there's no startup error, but now that I had a closer look, there's no indication of Hibernate Search actually starting, too.

      Appearently it isn't starting because I get the listeners not configured exception below when actually trying to fire a query:

      10:24:22,904 ERROR [de.axxur.tic.sessionbean.search.fulltext.AbstractFullTextSearch] (http--127.0.0.1-8080-1) Hibernate Search Event listeners not configured, please check the reference documentation and the application's hibernate.cfg.xml: org.hibernate.HibernateException: Hibernate Search Event listeners not configured, please check the reference documentation and the application's hibernate.cfg.xml
                at org.hibernate.search.util.impl.ContextHelper.getSearchFactoryBySFI(ContextHelper.java:65) [hibernate-search-orm.jar:4.1.0.CR3]
                at org.hibernate.search.util.impl.ContextHelper.getSearchFactoryBySessionImplementor(ContextHelper.java:47) [hibernate-search-orm.jar:4.1.0.CR3]
                at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.getSearchFactoryImplementor(FullTextQueryImpl.java:342) [hibernate-search-orm.jar:4.1.0.CR3]
                at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.<init>(FullTextQueryImpl.java:95) [hibernate-search-orm.jar:4.1.0.CR3]
                at org.hibernate.search.impl.FullTextSessionImpl.createFullTextQuery(FullTextSessionImpl.java:119) [hibernate-search-orm.jar:4.1.0.CR3]
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_15]
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_15]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_15]
                at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_15]
                at org.jboss.seam.persistence.HibernateSessionInvocationHandler.invoke(HibernateSessionInvocationHandler.java:93) [jboss-seam.jar:2.3.0.Final]
                at sun.proxy.$Proxy119.createFullTextQuery(Unknown Source)
      [...]
      

       

      There's no hibernate.cfg.xml and I'm using Annotations to configure my Entities in addition to this bit from persistence.xml:

       

      <property name="hibernate.search.default.directory_provider" value="filesystem"/>
      <property name="hibernate.search.default.indexBase" value="./indexes"/>
      <property name="hibernate.search.default.worker.batch_size" value="3000"/>
      <property name="hibernate.search.default.similarity" value="de.axxur.tic.sessionbean.search.fulltext.MineSimilarity"/>
      

       

      My setup is Seam-2.3 on Jboss AS 7.1.1 with Hibernate 4.1, Hibernate starts fine and I'm able to query my database just fine. It's only when I'm trying to access Hibernate Search facilities the error comes up.

      Does someone know what I can do to startup Hibernate Search properly?