Can't register Oracle jdbc driver
Hello all,
I am testing Jboss EAP 7.0 on Redhat 7, and want to connect backend Oracle 11g r2, so I downloaded ojdbc6.jar driver from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html .
I already added this ojdbc6.jar new core module in CLI by the following command:
module add --name=com.oracle --resources=/root/ojdbc6.jar --dependencies=javax.api,javax.transaction.api
In EAP_HOME/modules/com/oracle/main/ directory have the following files:
module.xml ojdbc6.jar
Below is module.xml :
<?xml version="1.0" ?>
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
And then want to register the JDBC driver in CLI by the following command , but failed:
/subsystem=datasources/jdbc-driver=oracle:add(driver-module-name=com.oracle.jdbc,driver-name=oracle,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)
{
"outcome" => "failed",
"failure-description" => "WFLYJCA0041: Failed to load module for driver [com.oracle.jdbc]",
"rolled-back" => true
}
I am following the following guideline:
https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/configuration_guide/datasource_management
Thanks
Responses
Hi Wilson,
Looking at the commands you have listed, you have created the JDBC module with the module name com.oracle, but when you are creating the driver you are referencing the module name as driver-module-name=com.oracle.jdbc.
I think you need to use the correct name of the module you created for the /subsystem=datasources/jdbc-driver=oracle:add command to work.
If you need more assistance, I would recommend opening a support case so our support engineers have a deeper look into your configuration.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
