Hibernate OGM 5.4.1 2018-12-18 - EAR still won't deploy


#1

Continuing my 9-month quest to get Hibernate OGM for MongoDB running on JBoss WildFly 14.0.0.Final Though there has been a 14.0.1 & 15.0.0.Final releases during that period.

Followed the instructions to the letter in the Hibernate OGM 5.4.1.Final: Reference Guide

In particular from: 4.5. How to package Hibernate OGM applications for WildFly 14.0

I use Home Brew to install all my versions of WildFly on my MacBook and have had OGM for MongoDB working since WildFly 11. Currently running on Wildfly 13.0.0.Final. I used (Home) Brew to upgrade to the latest available 14.0.0.Final. Copy the appropriate modules from my “provisioned” version created using Gradle inside IntelliJ. Updated the persistance.xml and jboss-deployment-structure.xml

When I deploy my EAR I get: org.jboss.modules.ModuleLoadError: org.hibernate.orm.jipijapa-hibernate5:5.3

13:05:52,817 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit.“GoStopHandle.ear”.FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit.“GoStopHandle.ear”.FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment “GoStopHandle.ear”

at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:151)

at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)

at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)

at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)

at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)

at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)

at java.lang.Thread.run(Thread.java:745)

Caused by: org.jboss.modules.ModuleLoadError: org.hibernate.orm.jipijapa-hibernate5:5.3

The standard Home Brew Installed version of JBoss Wildfly 14.0.0.Final has these directories:

jipijapa-hibernate4-3
jipijapa-hibernate5
jipijapa-hibernate5-3

and my provisioned version of JBoss WildFly 14.0.0.Final has exactly the same directory structure and content.

Any ideas what’s the cause of the “org.hibernate.orm.jipijapa-hibernate5:5.3” unable to load error?

Thanks.


#2

Missing ORM directory & contents in Home Brew installed WildFly 14.0.0.Final. Copied from ‘provisioned’ version and this fixed above and have moved on to the following:

Same as one of my previous errors (from October 2018): ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.boot.internal.EnversIntegrator not a subtype

When I was told:

I’m sorry but actually the hibernate-ogm-featurepack-* modules of Hibernate OGM 5.4.0.CR1 work only with WildFly 13.x. There is open issue for WildFly 14.x: https://hibernate.atlassian.net/browse/OGM-1523 .

The full error is:

16:40:36,115 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool – 22) MSC000001: Failed to start service jboss.persistenceunit.“GoStopHandle.ear/GoStopHandleJAR.jar#goStopHandleMongoDBPersistenceUnit”.FIRST_PHASE: org.jboss.msc.service.StartException in service jboss.persistenceunit.“GoStopHandle.ear/GoStopHandleJAR.jar#goStopHandleMongoDBPersistenceUnit”.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:650)

at org.jboss.as.jpa.service.PhaseOnePersistenceUnitServiceImpl$1.run(PhaseOnePersistenceUnitServiceImpl.java:137)

at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)

at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)

at java.lang.Thread.run(Thread.java:745)

at org.jboss.threads.JBossThread.run(JBossThread.java:485)

Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.boot.internal.EnversIntegrator not a subtype

Is the original WildFly bug mentioned really fixed? Says closed.


#3

The issue is closed and we have integration tests with WildFly 14. It’s possible that we might have missed something, though. In particular, we didn’t try the Home Brew version of WildFly 14, we use the wildfly-server-provisioning-maven-plugin for our tests. I assume there is something wrong in the modules you copied on WildFly 14.

You can check our configuration in the sources of Hibernate OGM: https://github.com/hibernate/hibernate-ogm/blob/master/integrationtest/pom.xml#L82

and this is the feature packs configuration XML: https://github.com/hibernate/hibernate-ogm/blob/master/integrationtest/server-provisioning.xml


#4

I think more information about the WildFly setup you are using would help (something that I can test).


#5

Just seen your first message will investigate. I use Gradle.

So do you provision a version of WildFly 14.0.0.Final and use that version? Didn’t appear complete with all the modules to me?

Current process …

Installed with Wildfly 14.0.0.Final using Home Brew in macOS X.

Gradle provision:

plugins {
  id "org.wildfly.build.provision"   version '0.0.9'
}

repositories {
	mavenLocal()
	mavenCentral()
	maven {
		name 'jboss-nexus'
		url "http://repository.jboss.org/nexus/content/groups/public/"
	}
}

provision {
	//Optional destination directory:
	destinationDir = file("wildfly-custom")

    configuration = file( 'wildfly-server-provisioning.xml' )

	// Define variables which need replacing in the provisioning configuration!
	variables['wildfly.version'] = '14.0.0.Final'

    // OGM 5.4
    variables['hibernate-orm.version'] = '5.3.6.Final'
    variables['hibernate-search.version'] = '5.11.0.Final'
    variables['hibernate-ogm.version'] = '5.4.1.Final'
}

wildfly-server-provisioning.xml:

<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1" copy-module-artifacts="true">
    <feature-packs>
        <feature-pack
                groupId="org.wildfly"
                artifactId="wildfly-feature-pack"
                version="${wildfly.version}"/>
        <feature-pack
                groupId="org.hibernate"
                artifactId="hibernate-orm-jbossmodules"
                version="${hibernate-orm.version}"/>
        <feature-pack
                groupId="org.hibernate"
                artifactId="hibernate-search-jbossmodules-orm"
                version="${hibernate-search.version}"/>
        <feature-pack
                groupId="org.hibernate.ogm"
                artifactId="hibernate-ogm-featurepack-mongodb"
                version="${hibernate-ogm.version}"/>
    </feature-packs>
</server-provisioning>

From the generated WildFly I copied the OGM and Search modules to my Home Brew installed WildFly.


#6

Finally, OGM is now deployed on JBoss WildFly 14.0.0.Final using the wildfly-server-provisioning.xml & Gradle.

All I had to do was run “gradle provision”.
Copy the generated “wildfly-custom” directory outside my IntelliJ project,
Copy my standalone.xml and standalone.conf from WildFly 13.0.0.Final directory to the same directory in wildfly-custom.
Copy a legacy MySQL module from: modules/system/layers/base to the same directory in wildfly-custom…

Ran “./standalone.sh -b 0.0.0.0 --server-config=standalone-full.xml -Dee8.preview.mode=true” from the console.

Started and I deployed the EAR and the test web page displayed with data from MongoDB.

Thanks for all your help I think provisioning is the only way to do it.


#7

Great! I’m glad it worked.


#8

FYI - I’ve also deployed my EAR and it’s running fine using Hibernate OGM 5.4.1 on (a provisioned version of) JBoss WildFly 15.0.0.Final.