I am setting up Hibernate Search 5.5.5 to use Infinispan 8.2.2 on Wildfly 10. I configured only the Infinispan module in Wildfly, not the Hibernate search module.
Inside persistence.xml, I placed this configuration:
<property name="hibernate.search.infinispan.cachemanager_jndiname" value="java:jboss/infinispan/container/hibernateSearch" /> <property name="wildfly.jpa.hibernate.search.module" value="none" />
This is because it seems that Infinispan is used, but does not save the index.
All caches are configured in domain.xml, as shown below:
<cache-container name="hibernateSearch" default-cache="LuceneIndexesData" jndi-name="java:jboss/infinispan/hibernateSearch" statistics-enabled="false"> <replicated-cache name="LuceneIndexesMetadata" mode="ASYNC"> <file-store fetch-state="false" passivation="false" preload="false" purge="false" shared="false" singleton="false"/> </replicated-cache> <replicated-cache name="LuceneIndexesLocking" mode="SYNC"> <file-store fetch-state="false" passivation="false" preload="false" purge="false" shared="false" singleton="false"/> </replicated-cache> <replicated-cache name="LuceneIndexesData" mode="ASYNC"> <file-store fetch-state="false" passivation="false" preload="false" purge="false" shared="false" singleton="false"/> </replicated-cache> </cache-container>
in jboss-deployment-structure.xml:
<module name="org.infinispan" slot="ispn-8.2"/> <module name="org.hibernate.search.orm" services="export" />
When I try to index everything, I get this error:
UNHANDLED_EXCEPTION: java.lang.IllegalArgumentException: java.lang.Object is not an indexed entity or a subclass of an indexed entity
But if I delete this line:
<property name="wildfly.jpa.hibernate.search.module" value="none" />
I got
org.hibernate.search.exception.SearchException: Wrong configuration of directory provider: class org.infinispan.hibernate.search.spi.InfinispanDirectoryProvider does not implement interface org.hibernate.search.store.DirectoryProvider
The problem seems to be the same as described here:
https://developer.jboss.org/thread/271789
But I do not find any working solution, and I am sure that I do not have one or more versions of Infinispan or Hibernate in my class path.
What's wrong?: (
java hibernate hibernate-search wildfly infinispan
Davide Non-Vattelapesca
source share