JBAS010441: Failed to load module for driver [...] in JBoss EAP 7 / 6
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.x
- 6.x
Issue
- Failing to load JDBC module with the error below.
<?xml version="1.1" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="oracle.jdbc.driver">
<resources>
<resource-root path="ojdbc7.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
10:46:24,940 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 25) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "OracleDriver")
]) - failure description: "JBAS010441: Failed to load module for driver [oracle.jdbc.driver]"
...
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.OracleDriver (missing) dependents: [service jboss.driver-demander.java:jboss/datasources/OracleDS, service jboss.data-source.java:jboss/datasources/OracleDS]
...
- I've added to modules both at the domain level and host level just to be safe. but still getting :
JBAS014613: Operation ("add") failed and JBAS010441: Failed to load module for driver [oracle.jdbc]
[Server:XYZ] 09:20:36,268 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 59) JBAS014613: Operation ("add") failed - address: ([
[Server:XYZ] ("subsystem" => "datasources"),
[Server:XYZ] ("jdbc-driver" => "oracle")
[Server:XYZ] ]) - failure description: "JBAS010441: Failed to load module for driver [oracle.jdbc]"
- I have created the jdbc driver module using CLI commands. But when i try to register the datasource, getting the below exception.
"outcome" => "failed",
"result" => undefined,
"failure-description" => "JBAS010839: Operation failed or was rolled back on all servers.",
"rolled-back" => true,
"server-groups" => {"other-server-group" => {"host" => {"server1" => {"server-two" => {"response" => {
"outcome" => "failed",
"result" => undefined,
"failure-description" => "JBAS010441: Failed to load module for driver [com.oracle.jdbc]",
"rolled-back" => true
}}}}}}
WFLYJCA0041: Failed to load module for driver [oracle.jdbc]
Resolution
- Change the xml declaration in the
module.xml
to:
<?xml version="1.0" encoding="UTF-8"?>
- Ensure all dependencies specified in the module.xml are spelled correctly and exist.
Root Cause
- Invalid xml.
- Module descriptor was named as modules.xml instead of
module.xml
. module.xml
and respective datasource jar is not present undermain
directory(com/datasource/main/module.xml
).- Incorrect Module Path.
- module.xml lists dependencies that do not exist
Diagnostic Steps
- Validate the xml is correct. Check the syntax of the xml.
- Module path should be correct.
- Validate all of the dependencies listed in the module.xml exist and are spelled correctly.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments