Do I have to install hibernate related modules to use 5.9.1.Final on WildFly 11

I config my project pom recomnaded by 5.9.1.Final reference guider.
So I did such as

  1. add wildfly-server-provisioning-maven-plugin to pom
  2. put server-provisioning.xml in the root of my project
  3. add follow properties persistence.xml

But nothing happen wildfly 11.0.0 server module contents and I got follow deploy exption.

2018-04-19 09:12:45,136 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.module.service.“deployment.tbn-app-ear.ear”.main: org.jboss.msc.service.StartException in service jboss.module.service.“deployment.tbn-app-ear.ear”.main: WFLYSRV0179: Failed to load module: deployment.tbn-app-ear.ear
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.modules.ModuleNotFoundException: org.hibernate:5.2
at org.jboss.modules.Module.addPaths(Module.java:1217)
at org.jboss.modules.Module.link(Module.java:1573)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1601)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:287)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:271)
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)

Do I have to soming more? Please help me.

The configuration from the reference guide should work as is, without any additional dependency. It should pull in Hibernate ORM automatically. We use a similar configuration in our own integration tests.

What is the content of your pom.xml and server-provisioning.xml?

Did you check that you actually deploy your application on the generated WildFly server, not some other pre-existing server?

Thanks yoann for your reply.
At first, I append my ear pom with content from guide, and same server-provisioning.xml from the reference guide. And I deploy app the server already configed on eclipse.
I got the above result.

Now I create new project and new pom only to create new wildfly server as follows

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>tbn-server</groupId>
  <artifactId>wildfly-tbn</artifactId>
  <version>11.0.0</version>
  <packaging>pom</packaging>
    <properties>  
        <server.output.dir>wildfly-tbn</server.output.dir>  
        <version.org.wildfly>11.0.0.Final</version.org.wildfly>  
    </properties>  
    
    <dependencies>  
        <dependency>  
            <groupId>org.wildfly</groupId>  
            <artifactId>wildfly-feature-pack</artifactId>  
            <version>${version.org.wildfly}</version>  
            <type>zip</type>
            <exclusions>  
                <exclusion>  
                    <groupId>*</groupId>  
                    <artifactId>*</artifactId>  
                </exclusion>  
            </exclusions>  
        </dependency>  
    </dependencies>  
    
    <build>  
        <finalName>${server.output.dir}</finalName>  
        <plugins>  
            <plugin>  
                <groupId>org.wildfly.build</groupId>  
                <artifactId>wildfly-server-provisioning-maven-plugin</artifactId>  
                <version>1.2.6.Final</version> 
                <executions>  
                    <execution>  
                        <id>server-provisioning</id>  
                        <goals>  
                            <goal>build</goal>  
                        </goals>  
                        <phase>compile</phase>  
                        <configuration>  
                            <config-file>server-provisioning.xml</config-file>  
                        </configuration>  
                    </execution>  
                </executions>  
            </plugin>  
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-assembly-plugin</artifactId>  
                <executions>  
                    <execution>  
                        <id>assemble</id>  
                        <phase>package</phase>  
                        <goals>  
                            <goal>single</goal>  
                        </goals>  
                        <configuration>  
                            <descriptors>  
                                <descriptor>assembly.xml</descriptor>  
                            </descriptors>  
                            <recompressZippedFiles>true</recompressZippedFiles>  
                            <finalName>${server.output.dir}</finalName>  
                            <appendAssemblyId>false</appendAssemblyId>  
                            <outputDirectory>${project.build.directory}</outputDirectory>  
                         <workDirectory>${project.build.directory}/assembly/work</workDirectory>  
                            <tarLongFileMode>gnu</tarLongFileMode>  
                        </configuration>  
                    </execution>  
                </executions>  
            </plugin>  
        </plugins> 
   </build>     
</project>
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1">
	<feature-packs>
		<feature-pack
			groupId="org.hibernate"
			artifactId="hibernate-search-jbossmodules-orm"
			version="5.9.1.Final"/>
		<feature-pack
			groupId="org.wildfly"
			artifactId="wildfly-feature-pack"
			version="11.0.0.Final" />
	</feature-packs>
</server-provisioning>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">  
    <id>tbn-server</id>  
    <formats>  
        <format>zip</format>  
    </formats>  
    <includeBaseDirectory>false</includeBaseDirectory>  
    <fileSets>  
        <fileSet>  
            <directory>target</directory>  
            <outputDirectory/>  
            <includes>  
                <include>${server.output.dir}/**</include>  
            </includes>  
        </fileSet>  
    </fileSets>  
</assembly>

I examined that generated server module dir, but there nothing except module.xml.
I deployed my app on on the generated WildFly server.

I got error as

2018-04-19 17:56:16,793 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 69) MSC000001: Failed to start service jboss.persistenceunit."tbn-app-ear.ear/tbn-report.jar#tbn-report".__FIRST_PHASE__: org.jboss.msc.service.StartException in service jboss.persistenceunit."tbn-app-ear.ear/tbn-report.jar#tbn-report".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not a subtype
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:128)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:104)
	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:137)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not a subtype
	at java.util.ServiceLoader.fail(ServiceLoader.java:239)
	at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
	at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
	at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:340)
	at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:40)
	at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:213)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildBootstrapServiceRegistry(EntityManagerFactoryBuilderImpl.java:366)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:167)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:150)
	at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:28)
	at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:40)
	at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.<init>(TwoPhaseBootstrapImpl.java:39)
	at org.jboss.as.jpa.hibernate5.HibernatePersistenceProviderAdaptor.getBootstrap(HibernatePersistenceProviderAdaptor.java:199)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.createContainerEntityManagerFactoryBuilder(PhaseOnePersistenceUnitServiceImpl.java:254)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.access$900(PhaseOnePersistenceUnitServiceImpl.java:59)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:125)

This second stack trace looks like a classpath issue, as if you were not using the right version of Hibernate ORM.

Did you add properties to your persistence.xml to explicitly select a Hibernate Search version and a Hibernate ORM version, like we explain in the documentation?

Also:

That’s normal, the modules are not added in the directory normally reserved to “user” modules, they are directly added to the “system” modules where all the default WildFly modules are.
The idea is to generate a WildFly server with just what you need for your application; though currently the WildFly feature packs are not fine-grained enough to allow you to get rid of unnecessary modules. I expect this should be possible in the future, though.

Yes, I did
in persistence.xml

properties
property name=“jboss.as.jpa.providerModule” value=“org.hibernate:5.2.12.Final”
property name=“wildfly.jpa.hibernate.search.module” value=“org.hibernate.search.orm:5.9.1.Final”

Thanks

You could try using org.hibernate:5.2 instead of org.hibernate:5.2.12.Final in your persistence.xml… It’s the only difference I see… I don’t see why it would change anything, but it’s worth a try.

If it doesn’t work, please set the Hibernate ORM logger to the debug level and post the full WildFly startup logs. I wonder what’s going on…

I changed to org.hibernate:5.2.
log file is truncated due to size

2018-04-20 10:33:26,875 DEBUG [org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl] (ServerService Thread Pool -- 72) Found use of deprecated `hibernate.classLoader.application` setting; use `hibernate.classLoaders` instead.
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 72) Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 72) Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 72) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 72) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 68) Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 68) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 68) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 64) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 64) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 69) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 69) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 67) PersistenceUnitInfo [
	name: trabiz-info
	persistence provider classname: org.hibernate.jpa.HibernatePersistenceProvider
	classloader: ModuleClassLoader for Module "deployment.tbn-app-ear.ear.law.jar" from Service Module Loader
	excludeUnlistedClasses: true
	JTA datasource: org.jboss.as.connector.subsystems.datasources.WildFlyDataSource@a3f6918
	Non JTA datasource: null
	Transaction type: JTA
	PU root URL: vfs:/C:/JJKWS/wildfly/wildfly-11-tbn/standalone/deployments/tbn-app-ear.ear/law.jar/
	Shared Cache Mode: UNSPECIFIED
	Validation Mode: AUTO
	Jar files URLs []
	Managed classes names [
		net.trabiz.law.entity.AgreementCdOt
		net.trabiz.law.entity.AgreementDataOt
		net.trabiz.law.entity.AgreementHtyAnnoFileOt
		net.trabiz.law.entity.AgreementHtyAnnoOt
		net.trabiz.law.entity.AgreementHtyOt
		net.trabiz.law.entity.AnnexCdOt
		net.trabiz.law.entity.AnnexHtyOt
		net.trabiz.law.entity.AtlAntiDumpingHsnoOt
		net.trabiz.law.entity.AtlAntiDumpingRateOt
		net.trabiz.law.entity.AtlCdOt
		net.trabiz.law.entity.AtlCdbRateOt
		net.trabiz.law.entity.AtlCtmsRateBaseOt
		net.trabiz.law.entity.AtlCtmsRateOt
		net.trabiz.law.entity.AtlDmtDespOt
		net.trabiz.law.entity.AtlDmtHsOt
		net.trabiz.law.entity.AtlDmtRateOt
		net.trabiz.law.entity.AtlEilmtLawOt
		net.trabiz.law.entity.AtlEilmtOrgOt
		net.trabiz.law.entity.AtlEilmtOt
		net.trabiz.law.entity.AtlEilmtSpeciesOt
		net.trabiz.law.entity.AtlFileOt
		net.trabiz.law.entity.AtlHslmtOt
		net.trabiz.law.entity.AtlHtyAnnoFileOt
		net.trabiz.law.entity.AtlHtyAnnoOt
		net.trabiz.law.entity.AtlHtyOt
		net.trabiz.law.entity.AtlLmtOt
		net.trabiz.law.entity.AtlQuotaAllocationOt
		net.trabiz.law.entity.AtlRooOt
		net.trabiz.law.entity.AtlRootOt
		net.trabiz.law.entity.AtlStrategicGoodsOt
		net.trabiz.law.entity.AtlTaDespOt
		net.trabiz.law.entity.AtlTaHsOt
		net.trabiz.law.entity.AtlTextOt
		net.trabiz.law.entity.CtmsRateAllOt
		net.trabiz.law.entity.CtmsRateBaseDescViewOt
		net.trabiz.law.entity.CtmsTableHsnoOt
		net.trabiz.law.entity.CtmsTableRatesOt
		net.trabiz.law.entity.DmtRateViewOt
		net.trabiz.law.entity.FtaAnnoRooCodeViewOt
		net.trabiz.law.entity.FtaAnnoRooOt
		net.trabiz.law.entity.FtaCoIssuerOt
		net.trabiz.law.entity.FtaOpGoodsOt
		net.trabiz.law.entity.FtaOpGoodsViewOt
		net.trabiz.law.entity.FtaRateScheduleOt
		net.trabiz.law.entity.FtaRooAmrOt
		net.trabiz.law.entity.FtaRooAmrViewOt
		net.trabiz.law.entity.FtaRooFormulaOt
		net.trabiz.law.entity.FtaSumaryCoOt
		net.trabiz.law.entity.FtaSumaryRooOt
		net.trabiz.law.entity.FtaSumaryRooViewOt
		net.trabiz.law.entity.FtaSumaryVerificationOt
		net.trabiz.law.entity.HsDespOt
		net.trabiz.law.entity.HsExpImgOt
		net.trabiz.law.entity.HsExpOt
		net.trabiz.law.entity.HsNoteImgOt
		net.trabiz.law.entity.HsNoteOt
		net.trabiz.law.entity.HsOpinionsImgInfoOt
		net.trabiz.law.entity.HsOpinionsImgOt
		net.trabiz.law.entity.HsOpinionsOt
		net.trabiz.law.entity.HsOpinionsViewOt
		net.trabiz.law.entity.HsSectionOt
		net.trabiz.law.entity.HsTitleOt
		net.trabiz.law.entity.HsnoUnitViewOt
		net.trabiz.law.entity.InfoUniqueOt
		net.trabiz.law.entity.KcsCuxRateOt
		net.trabiz.law.entity.KcsHsClassificationImgCountViewOt
		net.trabiz.law.entity.KcsHsClassificationImgInfoOt
		net.trabiz.law.entity.KcsHsClassificationImgOt
		net.trabiz.law.entity.KcsHsClassificationOt
		net.trabiz.law.entity.KcsHsDescOt
		net.trabiz.law.entity.KcsHsDescSpecOt
		net.trabiz.law.entity.LawCdOt
		net.trabiz.law.entity.LawDataOt
		net.trabiz.law.entity.LawHtyAnnoFileOt
		net.trabiz.law.entity.LawHtyAnnoOt
		net.trabiz.law.entity.LawHtyOt
		net.trabiz.law.entity.OrgCdOt
		net.trabiz.law.entity.PanCdOt
		net.trabiz.law.entity.PanDataOt
		net.trabiz.law.entity.PanDivOt
		net.trabiz.law.entity.PanFileOt
		net.trabiz.law.entity.PanGbOt
		net.trabiz.law.entity.PanHtyAnnoFileOt
		net.trabiz.law.entity.PanHtyAnnoOt
		net.trabiz.law.entity.PanHtyOt
		net.trabiz.law.entity.PanRootOt]
	Mapping files names [
		META-INF/law_named_queries.xml
		META-INF/law_native_queries.xml
		META-INF/law_view_native_queries.xml
		META-INF/law_view_named_queries.xml
		META-INF/law_search_native_queries.xml]
	Properties [
		jboss.entity.manager.jndi.name: java:/LawEM
		hibernate.search.default.indexBase: /var/lucene/indexes
		hibernate.search.default.directory_provider: filesystem
		wildfly.jpa.hibernate.search.module: org.hibernate.search.orm:5.9.1.Final
		jboss.entity.manager.factory.jndi.name: java:jboss/LawEMF
		jboss.as.jpa.providerModule: org.hibernate:5.2]
2018-04-20 10:33:26,875 DEBUG [org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl] (ServerService Thread Pool -- 67) Found use of deprecated `hibernate.classLoader.application` setting; use `hibernate.classLoaders` instead.
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 67) Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 67) Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 67) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:33:26,875 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 67) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:33:26,891 DEBUG [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 70) PersistenceUnitInfo [
	name: trabiz-code
	persistence provider classname: org.hibernate.jpa.HibernatePersistenceProvider
	classloader: ModuleClassLoader for Module "deployment.tbn-app-ear.ear.code.jar" from Service Module Loader
	excludeUnlistedClasses: false
	JTA datasource: org.jboss.as.connector.subsystems.datasources.WildFlyDataSource@3164846e
	Non JTA datasource: null
	Transaction type: JTA
	PU root URL: vfs:/C:/JJKWS/wildfly/wildfly-11-tbn/standalone/deployments/tbn-app-ear.ear/code.jar/
	Shared Cache Mode: UNSPECIFIED
	Validation Mode: AUTO
	Jar files URLs []
	Managed classes names [
		net.trabiz.code.entity.CdCommonOt
		net.trabiz.code.entity.CdFobCvntblOt
		net.trabiz.code.entity.CdFtaOt
		net.trabiz.code.entity.CdFtaStateOt
		net.trabiz.code.entity.CdHsUnitOt
		net.trabiz.code.entity.CdIsoPortOt
		net.trabiz.code.entity.CdIsoStateOt
		net.trabiz.code.entity.CdKcsBondOt
		net.trabiz.code.entity.CdKcsCurrencyOt
		net.trabiz.code.entity.CdKcsCuxRateOt
		net.trabiz.code.entity.CdKcsOrgOt
		net.trabiz.code.entity.CdKcsSvcDptOt
		net.trabiz.code.entity.CdUnContinentOt
		net.trabiz.code.entity.CdUnContinentSubOt
		net.trabiz.code.entity.CdUnStateOt
		net.trabiz.code.entity.CdZip3Ot
		net.trabiz.code.entity.CdZip5Ot
		net.trabiz.code.entity.CdZip6Ot
		net.trabiz.code.entity.CdmCatalogOt
		net.trabiz.code.entity.CdmCommonCatalogOt
		net.trabiz.code.entity.CdmCommonUseOt
		net.trabiz.code.entity.CdFtaRooOt]
	Mapping files names [
		META-INF/code_named_queries.xml
		META-INF/code_native_queries.xml]
	Properties [
		wildfly.jpa.hibernate.search.module: org.hibernate.search.orm:5.9.1.Final
		jboss.as.jpa.providerModule: org.hibernate:5.2]
2018-04-20 10:33:26,891 DEBUG [org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl] (ServerService Thread Pool -- 70) Found use of deprecated `hibernate.classLoader.application` setting; use `hibernate.classLoaders` instead.
2018-04-20 10:33:26,891 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 70) Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator].
2018-04-20 10:33:26,891 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 70) Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
2018-04-20 10:33:26,891 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 70) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:33:26,891 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 70) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:33:26,891 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 71) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:33:26,891 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 71) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:33:26,891 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 67) MSC000001: Failed to start service jboss.persistenceunit."tbn-app-ear.ear/law.jar#trabiz-info".__FIRST_PHASE__: org.jboss.msc.service.StartException in service jboss.persistenceunit."tbn-app-ear.ear/law.jar#trabiz-info".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.boot.internal.EnversIntegrator not a subtype
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:128)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:104)
	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:137)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.boot.internal.EnversIntegrator not a subtype
	at java.util.ServiceLoader.fail(ServiceLoader.java:239)
	at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
	at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
	at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:340)
	at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:40)
	at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:213)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildBootstrapServiceRegistry(EntityManagerFactoryBuilderImpl.java:366)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:167)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:150)
	at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:28)
	at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:40)
	at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.<init>(TwoPhaseBootstrapImpl.java:39)
	at org.jboss.as.jpa.hibernate5.HibernatePersistenceProviderAdaptor.getBootstrap(HibernatePersistenceProviderAdaptor.java:199)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.createContainerEntityManagerFactoryBuilder(PhaseOnePersistenceUnitServiceImpl.java:254)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.access$900(PhaseOnePersistenceUnitServiceImpl.java:59)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:125)
	... 7 more

download page says Compatibility as >= 5.2.3.Final
When I apply org.hibernate:5.2.12.Final, log is

2018-04-20 10:39:49,409 DEBUG [org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl] (ServerService Thread Pool -- 70) Found use of deprecated `hibernate.classLoader.application` setting; use `hibernate.classLoaders` instead.
2018-04-20 10:39:49,409 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 65) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 69) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 69) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 70) Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 70) Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 70) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 70) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:39:49,409 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 72) Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 72) Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 72) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:39:49,424 DEBUG [org.hibernate.integrator.internal.IntegratorServiceImpl] (ServerService Thread Pool -- 65) Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
2018-04-20 10:39:49,424 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 65) MSC000001: Failed to start service jboss.persistenceunit."tbn-app-ear.ear/site.jar#site".__FIRST_PHASE__: org.jboss.msc.service.StartException in service jboss.persistenceunit."tbn-app-ear.ear/site.jar#site".__FIRST_PHASE__: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.boot.internal.EnversIntegrator not a subtype
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:128)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:104)
	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:137)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.boot.internal.EnversIntegrator not a subtype
	at java.util.ServiceLoader.fail(ServiceLoader.java:239)
	at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
	at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
	at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:459)
	at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:40)
	at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:224)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.buildBootstrapServiceRegistry(EntityManagerFactoryBuilderImpl.java:405)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:195)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:163)
	at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:32)
	at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:89)
	at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.<init>(TwoPhaseBootstrapImpl.java:39)
	at org.jboss.as.jpa.hibernate5.HibernatePersistenceProviderAdaptor.getBootstrap(HibernatePersistenceProviderAdaptor.java:199)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.createContainerEntityManagerFactoryBuilder(PhaseOnePersistenceUnitServiceImpl.java:254)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl.access$900(PhaseOnePersistenceUnitServiceImpl.java:59)
	at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1$1.run(PhaseOnePersistenceUnitServiceImpl.java:125)

Please use markdown code formatting for long snippets of text. Add a line with only three backticks, like this:

```

… before and after your text, and then it will be far easier to read.

I noticed this:

So, there is something wrong with your setup. If envers, which is part of Hibernate ORM, is affected, this is definitely not a Hibernate Search problem.

Also, this:

There are multiple lines for each integrator. This is not normal.

I would say that your application somehow managed to pull multiple versions of Hibernate ORM/HibernateSearch. So:

  • Check that your EAR does not contain any Hibernate jar (Search, ORM or other). These jars should be provided by your WildFly server.
  • Check your explicitly declared WildFly module dependencies, if any. They should either not reference Hibernate modules at all, or reference the exact same version of the modules (not main). Check jboss-deployment-structure.xml in particular, and your jars’ MANIFEST files.

If all of this fail, please provide the full log in a pastebin (make sure it doesn’t contain any confidential information). I’m interested in the line containing HHH000412: Hibernate Core in particular.

Thanks yoann for your advice.

My parent pom includes as dependency

<dependency>
	<groupId>org.wildfly.bom</groupId>
	<artifactId>wildfly-javaee7-with-tools</artifactId>
	<version>11.0.0.Final</version>
	<type>pom</type>
    <scope>import</scope>
</dependency>

It makes pom includes hibernate
version 5.1.10.Final for c3p0, core, ehcache, entitymanager, envers, infinispan, jpamodelgen, proxool

5.5.8.Final for search, search-engine, search-infinispan, search-orm.

and version 5.3.5.Final for validator, validator-annotation-processor.

So I wonder there are deferent versions between compile time and deploy time.

I will try it later.