Code:
@Name("org.translator.search.IndexActivator")
@AutoCreate
@Scope(ScopeType.APPLICATION)
public class IndexHelper {
@Logger
private Log log;
@Observer(App.INIT_SUCCESS)
@Asynchronous
public void checkIndexOnStartup() {
FullTextEntityManager ftEm = Search.getFullTextEntityManager(entityManager);
SearchFactory searchFactory = ftEm.getSearchFactory();
ReaderProvider readerProvider = searchFactory.getReaderProvider();
......does not get here
so if I try to get ftEm.getSearchFactory(); the exception is thrown
Code:
RROR [AsynchronousExceptionHandler] Exeception thrown whilst executing asynchronous call
java.lang.ClassCastException: org.jboss.seam.persistence.HibernateSessionProxy
at org.hibernate.search.impl.FullTextSessionImpl.<init>(FullTextSessionImpl.java:102)
if I try to inject FullTextEntityManager entitymanager I get
Code:
19:48:32,468 ERROR [AsynchronousExceptionHandler] Exeception thrown whilst executing asynchronous call
java.lang.IllegalArgumentException: could not set field value: org.translator.search.IndexActivator.entityManager
at org.jboss.seam.Component.setFieldValue(Component.java:1894)
at org.jboss.seam.Component.access$600(Component.java:127)
at org.jboss.seam.Component$BijectedField.set(Component.java:2902)
at org.jboss.seam.Component.injectAttributes(Component.java:1703)
at org.jboss.seam.Component.inject(Component.java:1521)
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
I am using hibernate search 3.2.0, hibernate-commons-annotations-3.2.0.Final.jar JBOSS 5.1.0
I would appreciate any help.