# ModuleNotFoundException: org.hibernate.search.orm:5.10.4.Final

**URL:** <https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391>\
**Category:** Hibernate OGM\
**Created:** [September 12, 2018, 2:28pm UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391 "2018-09-12T14:28:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![NOTiFY](https://avatars.discourse-cdn.com/v4/letter/n/eada6e/32.png) [@NOTiFY](https://discourse.hibernate.org/u/NOTiFY)\
**Post date:** [September 12, 2018, 2:28pm UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/1 "2018-09-12T14:28:41Z")

</div>

I trying to upgrade from JBoss WildFly 13.0.0.Final to 14.0.0.Final using OGM on MongoDB.

I’m getting an error:

> Caused by: org.jboss.modules.ModuleNotFoundException: org.hibernate.search.orm:5.10.4.Final

In the feature pack reference in the documentation:

> The feature pack is published on the JBoss Nexus repository and Maven Central as [org.hibernate:hibernate-search-jbossmodules-engine:5.10.4.Final:zip](https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.hibernate~hibernate-search-jbossmodules-engine~%7BhibernateSearchVersion%7D~~).

I download this as a zip flle but there is no 5,10.4.Final.JAR is included.

Where do I get the 5.10.4 Search from?

What am I missing?

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [September 12, 2018, 3:43pm UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/2 "2018-09-12T15:43:29Z")

</div>

You should not use Hibernate Search 5.10.4.Final for now: we released it, so the documentation now refers to that version, but Maven Central is having trouble syncing its artifacts, so for now Search 5.10.4.Final is not available on Central. We hope it will get fixed soon, but don’t have any idea when, and have no control over it, unfortunately…

EDIT: you can use 5.10.3.Final safely with WildFly 14, you just won’t benefit from the latest bug fixes.

Regarding the fact that the ZIP does not contain any JAR: starting with Hibernate Search 5.9, [we’re using feature packs instead of plain module ZIPs](http://hibernate.org/search/releases/5.9/#wildfly-feature-packs). This means the distribution ZIP only contains the feature pack, which is essentially instructions to build a set of modules from Maven artifacts which some tool will download automatically.

You will have to use that feature pack to generate a Wildfly instance. How to do it is [described in the documentation](https://docs.jboss.org/hibernate/search/5.10/reference/en-US/html_single/#updating-wildfly-hibernatesearch-versions).

---

<div class="post-metadata">

**Author:** ![NOTiFY](https://avatars.discourse-cdn.com/v4/letter/n/eada6e/32.png) [@NOTiFY](https://discourse.hibernate.org/u/NOTiFY)\
**Post date:** [September 12, 2018, 3:53pm UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/3 "2018-09-12T15:53:24Z")

</div>

Many thanks, That’s clear.

So the Maven Artifacts will create the appropriate folders in the modules on my WildFly 14 instance for the search?

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [September 13, 2018, 6:02am UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/4 "2018-09-13T06:02:45Z")

</div>

As explained in [the documentation](https://docs.jboss.org/hibernate/search/5.10/reference/en-US/html_single/#provisioning-wildfly-nonmaven):

> Gradle users can use the [org.wildfly.build.provision](https://plugins.gradle.org/plugin/org.wildfly.build.provision) plugin, available on the official Gradle plugin portal.

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [September 13, 2018, 8:05am UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/5 "2018-09-13T08:05:51Z")

</div>

> [@yrodiere](#):
>
> You should not use Hibernate Search 5.10.4.Final for now: we released it, so the documentation now refers to that version, but Maven Central is having trouble syncing its artifacts, so for now Search 5.10.4.Final is not available on Central. We hope it will get fixed soon, but don’t have any idea when, and have no control over it, unfortunately…

The sync finally happened: Hibernate Search 5.10.4.Final is now available on Maven Central 🙂

---

<div class="post-metadata">

**Author:** ![NOTiFY](https://avatars.discourse-cdn.com/v4/letter/n/eada6e/32.png) [@NOTiFY](https://discourse.hibernate.org/u/NOTiFY)\
**Post date:** [September 14, 2018, 8:44am UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/6 "2018-09-14T08:44:03Z")

</div>

Using Gradle I have provisioned WildFly 14.0.0.Final in:

/build/provisioned-wildfly/ …

However a number of things are confusing me.

Do I need to put the file ‘wildfly-feature-pack.xml’ in my root and reference it from the Gradle Build:

```auto
// Provision WildFly 14.0.0.Final
provision {
    variables['wildfly.version'] = '14.0.0.Final'

    configuration = file( 'wildfly-feature-pack.xml' )
}

```

And do I have to add an ‘override’

```auto
// Provision WildFly 14.0.0.Final
provision {
    variables['wildfly.version'] = '14.0.0.Final'

    // Hibernate Search 5.10.4
    override( 'org.hibernate.search.orm:5.10.4.Final' ) {
        groupId = 'org.hibernate'
        artifactId = 'hibernate-search-jbossmodules-engine'
        version = '5.10.4'
    }
    configuration = file( 'wildfly-feature-pack.xml' )
}

```

A Gradle example to add the 5.10.4 search in the documentation would be useful 🙂

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [September 14, 2018, 9:07am UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/7 "2018-09-14T09:07:14Z")

</div>

> However a number of things are confusing me.

Let’s ask the author of the Wildfly Gradle Tools: @Sanne, any idea?

> A Gradle example to add the 5.10.4 search in the documentation would be useful 🙂

Probably… The thing is, we don’t use Gradle in Hibernate Search, so we don’t really follow the evolution of Gradle. So any Gradle example would likely get out of date without any of the active contributors to Hibernate Search knowing. Then the example would become misleading, which is arguably worse than having to find an up-to-date example elsewhere.

But I guess we can always try to add a warning to the example, stating which version of Gradle we’re talking about. @Sanne, WDYT? Could you add that?

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [September 24, 2018, 8:25am UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/11 "2018-09-24T08:25:47Z")

</div>

You may have found that out yourself, since you withdrawn your post, I’ll provide an answer just in case you still need help. I’m answering to your question at [https://developer.jboss.org/message/985312#985312](https://developer.jboss.org/message/985312#985312).

The Gradle provisioning plugin does not expect a feature pack as an input. It expect a server provisioning configuration, which itself lists one or several feature packs (plus some more advanced configuration if necessary, but you probably don’t need that). That’s what [this section](https://github.com/wildfly/wildfly-gradle-tools#custom-server) of the documentation is about.

As I said before, I’m not very familiar with Gradle, so I just followed the instructions in the Gradle plugin’s documentation and Hibernate Search’s documentation. Here are two files that make things work:

build.gradle:

```auto
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'
        variables['hibernate-search.version'] = '5.10.4.Final'
}

```

server-provisioning.xml:

```auto
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1">
        <feature-packs>
                <feature-pack
                                groupId="org.wildfly"
                                artifactId="wildfly-feature-pack"
                                version="${wildfly.version}" />
                <feature-pack
                                groupId="org.hibernate"
                                artifactId="hibernate-search-jbossmodules-orm"
                                version="${hibernate-search.version}" />
        </feature-packs>
</server-provisioning>

```

Running “gradle provision” with this configuration created a Wildfly instance in the “wildfly-custom” folder.

That being said, if I understood correctly, you were trying to upgrade _Hibernate OGM_ to begin with. I suppose, since you are trying to use Hibernate Search 5.10.4 and not 5.9, that you wanted to use Hibernate OGM 5.4 (which, friendly reminder, is still in Beta).

If so, I’d advise you to try Hibernate Search 5.10.2.Final first (since it’s the version targeted by ORM 5.4.0.Beta2).

Then the build.gradle becomes this (just change the Hibernate Search version and add one variable for the OGM version):

```auto
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.1.Final'
        variables['hibernate-search.version'] = '5.10.2.Final'
        variables['hibernate-ogm.version'] = '5.4.0.Beta2'
}

```

… And the server-provisioning.xml becomes this:

```auto
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1">
        <feature-packs>
                <feature-pack
                                groupId="org.wildfly"
                                artifactId="wildfly-feature-pack"
                                version="${wildfly.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>

```

Note that if you need the JARs to be copied to your Wildfly directory (e.g. to copy it in a production environment), you can add the “copy-module-artifacts” attribute to the server provisioning file:

```auto
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1" copy-module-artifacts="true">
        <feature-packs>
        ...

```

Finally, if you really want Search 5.10.4.Final, you can try to change the version in your build.gradle, and then use [this trick](https://docs.jboss.org/hibernate/search/5.10/reference/en-US/html_single/#selecting-updated-hibernate-search-version) to force WildFly to use the version you chose.

If it doesn’t work, there may be some subtelty when using OGM, and then I’m afraid you’ll need someone else, as I’m not overly familiar with the override mechanism in the wildfly-provisioning-plugin, nor with how OGM integrates with Search. @Sanne may help you when he comes back, otherwise you can try the Wildfly community (again).

---

<div class="post-metadata">

**Author:** ![NOTiFY](https://avatars.discourse-cdn.com/v4/letter/n/eada6e/32.png) [@NOTiFY](https://discourse.hibernate.org/u/NOTiFY)\
**Post date:** [September 24, 2018, 4:11pm UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/12 "2018-09-24T16:11:25Z")

</div>

Many thanks for that. I did make some progress.

I finally realised Gradle “does not expect a feature pack as an input. It expects a server provisioning”. Hence the deletion.

Your instructions have helped me move on, Though it can’t find:

> variables[‘hibernate-ogm.version’] = ‘5.4.0.Beta2.Final’

> \<feature-pack  
> groupId=“org.hibernate.ogm”  
> artifactId=“hibernate-ogm-featurepack-mongodb”  
> version=“${hibernate-ogm.version}”

Changed version to:

> variables[‘hibernate-ogm.version’] = ‘5.4.0.Beta2’

And it can’t find that either. Though it is listed in Central:

> Hibernate OGM For MongoDB » 5.4.0.Beta2

To test I added to my Gradle build:

`compile group: 'org.hibernate.ogm', name: 'hibernate-ogm-mongodb', version: '5.4.0.Beta2'`

It finds it okay.

> - What went wrong:  
> Execution failed for task ‘:provision’.
> 
> > Could not resolve all files for configuration ‘:detachedConfiguration14’.  
> > Could not find hibernate-ogm-mongodb.zip (org.hibernate.ogm:hibernate-ogm-mongodb:5.4.0.Beta2).  
> > Searched in the following locations:  
> > [https://repo.maven.apache.org/maven2/org/hibernate/ogm/hibernate-ogm-mongodb/5.4.0.Beta2/hibernate-ogm-mongodb-5.4.0.Beta2.zip](https://repo.maven.apache.org/maven2/org/hibernate/ogm/hibernate-ogm-mongodb/5.4.0.Beta2/hibernate-ogm-mongodb-5.4.0.Beta2.zip)

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [October 8, 2018, 6:57am UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/13 "2018-10-08T06:57:16Z")

</div>

Just saw your message; I recommend posting a new message instead of editing your message next time, because we don’t get notified when you simply edit a message.

I edited my post, the `5.4.0.Beta2` was indeed a typo.

Anyway, let’s cut the chase. Here is Gradle project that just works: [https://ufile.io/qjxsz](https://ufile.io/qjxsz) Unzip, go to the extracted directory, execute `gradle provision`, and voilà.

Content of this ZIP for the record:

`build.gradle`:

```auto
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.1.Final'
        variables['hibernate-search.version'] = '5.10.4.Final'
        variables['hibernate-ogm.version'] = '5.4.0.CR1'
}

```

`wildfly-server-provisioning.xml`:

```auto
<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-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>

```

Tested locally, I get a “wildfly-custom” directory containing a server with all I want: OGM 5.4.0.CR1, Search 5.10.4.Final, ORM 5.3.6.Final.

---

<div class="post-metadata">

**Author:** ![NOTiFY](https://avatars.discourse-cdn.com/v4/letter/n/eada6e/32.png) [@NOTiFY](https://discourse.hibernate.org/u/NOTiFY)\
**Post date:** [October 8, 2018, 9:09pm UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/14 "2018-10-08T21:09:07Z")

</div>

> [@yrodiere](#):
>
> variables[‘wildfly.version’] = ‘14.0.1.Final’ variables[‘hibernate-search.version’] = ‘5.10.4.Final’ variables[‘hibernate-ogm.version’] = ‘5.4.0.CR1’ }

The contents of your ZIP file was almost exactly what I had:

variables[‘wildfly.version’] = ‘14.0.0.Final’  
variables[‘hibernate-search.version’] = ‘5.10.4.Final’  
variables[‘hibernate-ogm.version’] = ‘5.4.0.Beta2’

I changed to yours:

variables[‘wildfly.version’] = ‘ **14.0.1.Final** ’  
variables[‘hibernate-search.version’] = ‘5.10.4.Final’  
variables[‘hibernate-ogm.version’] = ‘ **5.4.0.CR1** ’

When I run:

gradle provision

I still get:

Task :provision FAILED

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ‘:provision’.  
Could not resolve all files for configuration ‘:detachedConfiguration14’.

- Try:  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

- Get more help at [https://help.gradle.org](https://help.gradle.org)

BUILD FAILED in 0s  
1 actionable task: 1 executed

---

<div class="post-metadata">

**Author:** ![NOTiFY](https://avatars.discourse-cdn.com/v4/letter/n/eada6e/32.png) [@NOTiFY](https://discourse.hibernate.org/u/NOTiFY)\
**Post date:** [October 8, 2018, 9:33pm UTC](https://discourse.hibernate.org/t/modulenotfoundexception-org-hibernate-search-orm-5-10-4-final/1391/15 "2018-10-08T21:33:08Z")

</div>

\*\*\*\*\* UPDATE \*\*\*\*\*

Copied your gradle.build & wildfly-server-provisioning.xml from the exploded ZIP and that can ‘provision’, when it’s run as a ‘stand-alone’ Gradle Task.

However it just doesn’t work if the ‘provisioning’ is part of my main/complete gradle.build.

Thanks very much for your efforts and help.
