4 Replies Latest reply on May 20, 2014 8:58 AM by Samuli Saarinen

    Using infinispan query on wildfly

    Samuli Saarinen Newbie

      Hi,

       

      I'm trying to use Infinispan query and querydsl on Wildfly 8.1.CR1 but when I try to create a search manager i get the following exception:

      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) [infinispan-query-6.0.2.Final.jar:6.0.2.Final]
          at org.infinispan.query.impl.ComponentRegistryUtils.getComponent(ComponentRegistryUtils.java:20) [infinispan-query-6.0.2.Final.jar:6.0.2.Final]
          at org.infinispan.query.impl.SearchManagerImpl.<init>(SearchManagerImpl.java:42) [infinispan-query-6.0.2.Final.jar:6.0.2.Final]
          at org.infinispan.query.Search.getSearchManager(Search.java:17) [infinispan-query-6.0.2.Final.jar:6.0.2.Final]
          at com.test.client.DummyService.search(DummyService.java:92) [classes:]
      
      

       

      the code that throws the exception is line 2 bellow:

      log.info("indexing enabled={}", cache.getCacheConfiguration().indexing().enabled());
      SearchManager sm = Search.getSearchManager(cache);
      
      

       

      And what is also curious is that in server log says "indexing enabled=true"

       

      the cache container in standalone.xml is as follows:

      <subsystem xmlns="urn:jboss:domain:infinispan:2.0">
                  <cache-container name="test" default-cache="default">
                      <transport lock-timeout="60000"/>
                      <local-cache name="default" batching="true">
                          <transaction mode="NONE"/>
                          <indexing index="LOCAL"/>
                      </local-cache>
                  </cache-container>
      
      

       

      I have also tried with index="ALL" with the same result.

       

      My module dependencies are specified as follows:

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
          <deployment>
              <dependencies>
                  <module name="org.infinispan" export="true"/>
                  <module name="org.infinispan.client.hotrod" export="true"/>
                  <module name="org.infinispan.query" export="true"/>
                  <module name="org.infinispan.query.dsl" export="true" />
                  <module name="org.hibernate.search.engine" export="true"/>
              </dependencies>
          </deployment>
      
      </jboss-deployment-structure>
      
      

       

       

      Could some help me out here?

       

      Br,

      Samuli