JBoss module not found org.mongo:main

1,080 views
Skip to first unread message

Louis

unread,
Nov 4, 2021, 10:20:06 AM11/4/21
to WildFly
Hello !

I'm trying to deploy applications on wildfly 10. But during deployments, wildfly console gives me the following error :

ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.module.service."deployment.MyApp-1.0.0-SNAPSHOT.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.MyApp-1.0.0-SNAPSHOT.war  ".main: WFLYSRV0179: Failed to load module: deployment.MyApp-1.0.0-SNAPSHOT.war  :main at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.jboss.modules.ModuleNotFoundException: org.mongodb:main at org.jboss.modules.Module.addPaths(Module.java:1092) at org.jboss.modules.Module.link(Module.java:1448) at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476) at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225) at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68) ... 5 more

And in the file MyApp-1.0.0-SNAPSHOT.war.failed :

{"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.MyApp-1.0.0-SNAPSHOT.war \".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.MyApp-1.0.0-SNAPSHOT.war \".main: WFLYSRV0179: Failed to load module: MyApp-1.0.0-SNAPSHOT.war :main
Caused by: org.jboss.modules.ModuleNotFoundException: org.mongodb:main"}}

I've been looking for solutions like :
- adding the jboss-deployment-structure.xml files, - add the jars for mongo java driver at "wildfly-10.0.0.Final \ modules \ system \ layers \ base \ org \ mongodb \ mongo-java-driver" in different versions - etc...
But none of them works. Do you have any idea where the problem might be? thanks in advance  

Amit Nijhawan

unread,
Nov 4, 2021, 10:25:55 AM11/4/21
to Louis, WildFly
This error means your installation is missing the module com.mongo . This module is not included by default. To fix this you need to create the com.oracle module with the required JAR files and corresponding module.xml. Place it /modules/system/layers/base

By following the brief answer, example for Oracle  I have done following steps:

1- Created directory structure oracle\ojdbc6\main under EAP-7.4.0\modules\system\layers\base\com\

2- Download and copy ojdbc6-11.2.0.3.jar and place it under main directory

3- Create module.xml file inside main directory with the following content

<?xml version="1.0" encoding="UTF-8"?>

<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc6">
    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

    <resources>
        <resource-root path="ojdbc6-11.2.0.3.jar"/>
        <!-- Insert resources here -->
    </resources>

    <dependencies>
    </dependencies>
</module




--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/98869ca1-5a82-4b80-8824-947d2353248fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages