1 Reply Latest reply on Jul 8, 2015 7:31 AM by Wolfgang Mayer

    datasource configuration and test connection problem

    LAKSHMI YERUVA Newbie

      Hi All,

       

      I configured oracle data source and while testing from jboss cli it is giving error like not valid test connection.In the JBOSS Admin console I am not getting the Test Connection button.

       

      I configured under /root/JBossEAP6.0/jboss-eap-6.0/modules/

      I created folder structure com/oracle/main/

       

      module.xml

       

      <?xml version="1.0" ?>

       

       

      <module xmlns="urn:jboss:module:1.1" name="com.oracle">

       

       

          <resources>

              <resource-root path="ojdbc6.jar"/>

          </resources>

       

       

          <dependencies>

              <module name="javax.api"/>

              <module name="javax.transaction.api"/>

          </dependencies>

      </module>

       

      I added ojdbc6.jar in this folder structure.

       

      In my domain.xml the following changes are done

       

      <subsystem xmlns="urn:jboss:domain:datasources:1.1">

                      <datasources>

                          <datasource jndi-name="java:jboss/datasources/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="true">

                              <connection-url>jdbc:oracle:thin:@16.183.93.152:1521:orcl</connection-url>

                              <driver>oracle</driver>

                              <security>

                                  <user-name>system</user-name>

                                  <password>manager</password>

                              </security>

                          </datasource>

                          <drivers>

                              <driver name="oracle" module="com.oracle">

                                  <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

                                  <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                              </driver>

                          </drivers>

                      </datasources>

                  </subsystem>

       

      These are the correct DB credentials and URL is also correct.

       

      My domain.xml is under /root/JBossEAP6.0DomainInstance/master/domain/configuration

       

       

      I executed the below command and output is as below

      [domain@16.183.93.152:9999 /]  /host=masterOne/server=server-one-master/subsystem=datasources:installed-drivers-list

      {

          "outcome" => "success",

          "result" => [{

              "driver-name" => "oracle",

              "deployment-name" => undefined,

              "driver-module-name" => "com.oracle",

              "module-slot" => "main",

              "driver-datasource-class-name" => "",

              "driver-xa-datasource-class-name" => "oracle.jdbc.xa.client.OracleXADataSource",

              "driver-class-name" => "oracle.jdbc.driver.OracleDriver",

              "driver-major-version" => 11,

              "driver-minor-version" => 2,

              "jdbc-compliant" => true

          }]

      }

       

      Please suggest me what are the changes to be done.

        • 1. Re: datasource configuration and test connection problem
          Wolfgang Mayer Master

          Did you configure the jdbc-driver before adding the datasource?

           

          I'd suggest that you use jboss-cli or web console for adding jdbc-driver and datasources. This should reduce the risk of formal errors.

          It is correct that the Test Connection button is not available in 6.0.

          But you may use jboss-cli for these purposses like: /host=master/server=server-one/subsystem=datasources/data-source=OracleDS:test-connection-in-pool