I config my project pom recomnaded by 5.9.1.Final reference guider.
So I did such as
add wildfly-server-provisioning-maven-plugin to pom
put server-provisioning.xml in the root of my project
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)
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
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?
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.
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…
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 (notmain). 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.