2 Replies Latest reply on Apr 3, 2019 5:55 AM by mpetrovics

    wildfly datasource config

    samajaypal2

           ejb:ee/ee.jar/AccountBase!emagia.ejb.AccountBaseEngineHome

       

       

      16:18:04,526 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 74) WFLYCLINF0002: Started client-mappings cache from ejb container

      16:18:04,541 INFO  [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900: 3.1.0 (Final)

      16:18:05,088 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "datasources"),

          ("data-source" => "EMAGIADS")

      ]) - failure description: {

          "WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.oracle"],

          "WFLYCTL0180: Services with missing/unavailable dependencies" => [

              "jboss.driver-demander.java:jboss/datasources/EMAGIADS is missing [jboss.jdbc-driver.oracle]",

              "org.wildfly.data-source.EMAGIADS is missing [jboss.jdbc-driver.oracle]"

          ]

      }

      16:18:05,104 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "datasources"),

          ("data-source" => "EMAGIADS")

      ]) - failure description: {

          "WFLYCTL0412: Required services that are not installed:" => [

              "jboss.jdbc-driver.oracle",

              "jboss.jdbc-driver.oracle"

          ],

          "WFLYCTL0180: Services with missing/unavailable dependencies" => [

              "jboss.driver-demander.java:jboss/datasources/EMAGIADS is missing [jboss.jdbc-driver.oracle]",

              "org.wildfly.data-source.EMAGIADS is missing [jboss.jdbc-driver.oracle]",

              "org.wildfly.data-source.EMAGIADS is missing [jboss.jdbc-driver.oracle]"

          ]

      }

        • 1. Re: wildfly datasource config
          mayerw01

          You should make sure that your oracle data base driver is successfully installed before adding the data source.

          • 2. Re: wildfly datasource config
            mpetrovics

            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.