Hi folks,
I decided to bind Hibernate Search to my Hibernate + Spring application.
I cannot understand how I may configure Search Event listeners in my springapp-servlet.xml.
If I do it this way
Code:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="eventListeners">
<map>
<entry key="pre-update">
<bean class="org.hibernate.search.event.FullTextIndexEventListener" />
</entry>
<entry key="pre-insert">
<bean class="org.hibernate.search.event.FullTextIndexEventListener" />
</entry>
<entry key="post-delete">
<bean class="org.hibernate.search.event.FullTextIndexEventListener" />
</entry>
</map>
</property>
I have an exception on startup
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/shop.do' defined in ServletContext resource [/WEB-INF/springapp-servlet.xml]: Cannot resolve reference to bean 'dao' while setting bean property 'dao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao' defined in ServletContext resource [/WEB-INF/springapp-servlet.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/springapp-servlet.xml]: Invocation of init method failed;
nested exception is java.lang.ArrayStoreException: org.hibernate.search.event.FullTextIndexEventListener
Help me please. What is wrong?