Wildfly 8.1.0.Final with Hibernate Search - Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not found
pawel.predki Sep 16, 2014 7:51 AMI'm trying to include the Hibernate Search module to my EAR project but when I start its deployment I get the following error message:
ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) JBAS014613: Operation ("redeploy") failed - address: ([("deployment" => "myapp-rtc-ear.ear")]) - failure description: { "JBAS014671: Failed services" => {"jboss.persistenceunit.\"myapp-rtc-ear.ear/myapp-rtc-ejb.jar#myappdb\".__FIRST_PHASE__" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"myapp-rtc-ear.ear/myapp-rtc-ejb.jar#myappdb\".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not found Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not found"}, "JBAS014771: Services with missing/unavailable dependencies" => [ "jboss.deployment.subunit.\"myapp-rtc-ear.ear\".\"myapp-rtc-properties.jar\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"myapp-rtc-ear.ear\".\"myapp-rtc-properties.jar\".beanmanager]", "jboss.deployment.unit.\"myapp-rtc-ear.ear\".weld.weldClassIntrospector is missing [jboss.deployment.unit.\"myapp-rtc-ear.ear\".beanmanager]", "jboss.deployment.subunit.\"myapp-rtc-ear.ear\".\"myapp-rtc-web.war\".weld.weldClassIntrospector is missing [jboss.deployment.subunit.\"myapp-rtc-ear.ear\".\"myapp-rtc-web.war\".beanmanager]" ] }
I followed the instructions specified in the hibernate search reference (http://docs.jboss.org/hibernate/search/4.5/reference/en-US/html_single/#d0e141 and http://docs.jboss.org/hibernate/search/4.5/reference/en-US/html_single/#search-configuration-deploy-on-wildfly). I included the hibernate search dependency in my pom.xml file of the EJB module:
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search-orm</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <scope>provided</scope> </dependency>
In the main pom.xml file, I'm including
<dependency> <groupId>org.wildfly.bom</groupId> <artifactId>jboss-javaee-7.0-with-hibernate</artifactId> <version>${version.jboss.bom}</version> <type>pom</type> <scope>import</scope> </dependency>
and I also specify the version numbers as properties:
<properties> <version.org.hibernate>4.3.5.Final</version.org.hibernate> <version.org.hibernate.search>4.5.1.Final</version.org.hibernate.search> </properties>
although I'm not really sure this makes sense.
I also added the jboss-depolyment-structure.xml file to the META-INF folder in the EAR module:
<jboss-deployment-structure> <deployment> <dependencies> <module name="org.hibernate.search.orm" services="export" /> </dependencies> </deployment> </jboss-deployment-structure>
The error I specify doesn't appear if the jboss-depolyment-structure.xml is missing but I get NoClassDefFoundExceptions whenever I try to access any of the hibernate search classes.
What could be the problem here? What am I missing? Is it better not to rely on the built-in hibernate classes and simply add them using maven, as I would other external libraries?
Any help is greatly appreciated!