Error using indexed cache in JBoss 7.1.0 Final
andersbohn Mar 4, 2012 4:12 PMSetup three containers in standalone.xml:
<cache-container name="bskCache" default-cache="data">
<local-cache name="data" start="EAGER">
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="600000"/>
</local-cache>
<local-cache name="credentials">
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="600000"/>
</local-cache>
<local-cache name="searchindex" start="EAGER" indexing="LOCAL">
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="108000000"/>
</local-cache>
</cache-container>
Added infinispan-query, hibernate-search with dependencies as jar-files to the org.infinispan-module. module.xml:
<resource-root path="infinispan-query-5.1.1.Final.jar"/>
<resource-root path="avro-1.5.1.jar"/>
<resource-root path="jackson-core-asl-1.7.3.jar"/>
<resource-root path="jackson-mapper-asl-1.7.3.jar"/>
<resource-root path="paranamer-2.3.jar"/>
<resource-root path="snappy-java-1.0.1-rc3.jar"/>
<resource-root path="lucene-core-3.5.0.jar"/>
<resource-root path="hibernate-search-4.1.0.CR1.jar"/>
<resource-root path="hibernate-search-orm-4.1.0.CR1.jar"/>
<resource-root path="hibernate-search-analyzers-4.1.0.CR1.jar"/>
<resource-root path="hibernate-search-engine-4.1.0.CR1.jar"/>
<resource-root path="lucene-analyzers-3.5.0.jar"/>
<resource-root path="lucene-grouping-3.5.0.jar"/>
<resource-root path="lucene-highlighter-3.5.0.jar"/>
<resource-root path="lucene-memory-3.5.0.jar"/>
<resource-root path="lucene-misc-3.5.0.jar"/>
<resource-root path="lucene-smartcn-3.5.0.jar"/>
<resource-root path="lucene-spatial-3.5.0.jar"/>
<resource-root path="lucene-spellchecker-3.5.0.jar"/>
<resource-root path="lucene-stempel-3.5.0.jar"/>
<resource-root path="solr-analysis-extras-3.5.0.jar"/>
<resource-root path="solr-commons-csv-3.5.0.jar"/>
<resource-root path="solr-core-3.5.0.jar"/>
<resource-root path="solr-solrj-3.5.0.jar"/>
Plus these dependencies already in other JBoss 7 modules:
<dependencies>
<module name="javax.api"/>
<!--added -->
<module name="org.hibernate"/>
<module name="org.apache.commons.codec"/>
<module name="org.apache.commons.io"/>
<module name="org.apache.commons.lang"/>
<module name="com.google.guava"/>
....
Deployed as EAR with this jboss-deployment-structure.xml:
<jboss-deployment-structure>
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="org.apache.log4j" export="true"/>
<module name="com.h2database.h2" export="true"/>
<module name="org.slf4j" export="true"/>
<module name="org.hibernate" export="true" services="import"/>
<module name="org.infinispan" export="true" services="import"/>
<module name="org.apache.commons.beanutils" export="true"/>
<module name="org.apache.commons.codec" export="true"/>
<module name="org.jboss.ws.cxf.jbossws-cxf-client" export="true" services="import"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
I can @Resource-inject the cache and put index-annotated into it, but when I attempt to get a searchmanager:
SearchManager searchManager = Search.getSearchManager(searchindexCache);
I get:
java.lang.IllegalArgumentException: Indexing was not enabled on this cache. interface org.hibernate.search.spi.SearchFactoryIntegrator not found in registry
I have this running on plain JRE with a new DefaultCacheManager and infinispan.xml-configuration.
I tried including the jars in the ear, and also to instatiate my own DefaultCacheManager inside JBoss 7. But the error is the same.
Added: I tried adding the SearchFactoryIntegrator manually, which gets me to a new missing component, QueryInterceptor (which I cannot add after cache has started).. This appears to be a classloader issue ?
Message was edited by: Anders Jespersen - added info