Unable to enable infinispan index on wildfly 8.2.0
nanthakumar Nov 4, 2015 6:38 AMI'm working with Wildfly 8.2.0 and trying to enable indexing for a infinispan cache. I've configured indexing properly, but still error thrown as "Indexing was not enabled on this cache". I hope dependency creating problem.
Infinispan XML:
<namedCache name="myCache"> <indexing enabled="true" indexLocalOnly="true"> <properties> <property name="default.directory_provider" value="ram" /> </properties> </indexing> <compatibility enabled="true"/> </namedCache>
Code:
QueryFactory qf = Search.getSearchManager(myCache).getQueryFactory(); Query query = qf.from(myDO.class) .having("allHierarhy").contains(groupId) .toBuilder().build(); List<ActiveCallDO> list = query.list();
Above configurations were working fine as standalone java application. But when it comes to wildfly, throwing below error,
java.lang.IllegalArgumentException: Indexing was not enabled on this cache. interface org.hibernate.search.spi.SearchFactoryIntegrator not found in registry at org.infinispan.query.impl.ComponentRegistryUtils.getComponent(ComponentRegistryUtils.java:27) at org.infinispan.query.impl.ComponentRegistryUtils.getComponent(ComponentRegistryUtils.java:20) at org.infinispan.query.impl.SearchManagerImpl.<init>(SearchManagerImpl.java:42) at org.infinispan.query.Search.getSearchManager(Search.java:17) at com.dataservices.MyCache.getActiveCalls(MyCache.java:124) at org.apache.jsp.admin.sipadmin.activeCallsManagement_jsp._jspService(activeCallsManagement_jsp.java:253) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:366) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
I've added below modules as dependency in MANIFEST.MF file,
org.infinispan,org.infinispan.commons,org.infinispan.tree,org.hibernate,org.hibernate.search.engine,org.hibernate.search.orm,org.hibernate.hql,org.infinispan.query
Please anyone help me to resolve the issue..