-
1. Re: wildfly datasource config
mayerw01 Apr 3, 2019 4:38 AM (in response to samajaypal2)You should make sure that your oracle data base driver is successfully installed before adding the data source.
-
2. Re: wildfly datasource config
mpetrovics Apr 3, 2019 5:55 AM (in response to samajaypal2)As the log shows, the oracle driver is missing. You should add it to the system as a module. Check whether the WILDFLY_HOME/modules/system/layers/base/com/oracle/ojdbc6/main folder exists. If not, you have to crate it. Copy the oracle driver (ojdbc6.jar) into this folder. Create also a module.xml in the folder with the following content:
<?xml version='1.0' encoding='UTF-8'?>
<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc6">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
In the standalone.xml under the datasource subsystem you should add the next driver definition:
<drivers>
. . .
<driver name="oracle" module="com.oracle.ojdbc6">
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
</drivers>
In the datasource definítion you should refrence the oracle driver like this:
<driver>oracle</driver>
That's all.
In the log you should see somthing like this at the starting process of server:
INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 44)() WFLYJCA0004: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3)() WFLYJCA0018: Started Driver service with driver-name = oracle
Of course you may need another version of oracle driver. In this case you should use that is appropriate for you.