title: Configuring Compass with Annotated Hibernate
body: <p>I'm using Hibernate for a Java-based Web Application and want to add full-text search via Compass. Compass is supposed to support that, but fails to provide any useful Getting Started guide.</p>
  
  <p>I could figure out that I have to annotate my Entities with @Searchable and the various @SearchableXXX variations and accessing Compass in my service code via HibernateHelper.getCompass(sessionFactory).</p>
  
  <p>I end up with a HibernateException saying "Compass event listeners not configured, please check the reference documentation and the application's hibernate.cfg.xml".</p>
  
  <p>The <a href="http://www.compass-project.org/docs/2.1.0/reference/html/gps-embeddedhibernate.html" rel="nofollow noreferrer">reference documentation</a> again hints and hibernate.cfg.xml, while I configure Hibernate with Spring's AnnotationSessionFactoryBean. For that case, the documetantation mentions: "If Hibernate Annotations or Hibernate EntityManager (JPA) are used, just dropping Compass jar file to the classpath will enable it (make sure you don't have Hibernate Search in the classpath, as it uses the same event class name)." That doesn't work for me.</p>
  
  <p>Any ideas whats I'm missing or a good resource for getting started?</p>