Create Oracle JDBC Driver as a Module in Wildfly

1. Create a folder under the Wildfly directory:
…/wildfly-8.2.0.Final/modules/system/layers/base/oracle/jdbc/main

2. Create a module.xml file in the directory which is created at step 1 and put the content below.

3. Go to the link http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html and download ojdbc7.jar and put the jar file in the directory which is created at step 1.

4. Go to administration menu of WildFly 8.2 (http://localhost:9990/console/App.html)

5. Navigate to Configuration->Connector->Datasources and then Add a datasource
datasource

6. Specify the name of the datasource and JNDI name which should be started with java:/

datasource1

7. Select the Oracle Database Driver as seen below:
datasource2

8. Specify the jdbc url, username and password information.
datasource3

9. Finally datasource is created and you have to enable the datasource. After that to check if the connection is valid or not, you could select the datasource in the same page, and then there is a Test Connection button in the connection tab.

Leave a Reply

Your email address will not be published. Required fields are marked *