1 Reply Latest reply on Sep 27, 2017 8:40 AM by claudio4j

    JBoss DataSource Connection Error

    bcagrawal

      I am using JBOSS EAP 6.4.

       

      While starting the JBOS, I am getting the below

       

      20:56:46,724 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([

          ("subsystem" => "datasources"),

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

      ]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [

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

          "jboss.data-source.java:/datasources/mortgage is missing [jboss.jdbc-driver.ojdbc7_jar]"

      ]}

      20:56:46,726 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("enable") failed - address: ([

          ("subsystem" => "datasources"),

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

      ]) - failure description: {"JBAS014879: One or more services were unable to start due to one or more indirect dependencies not being available." => {

          "Services that were unable to start:" => [

              "jboss.data-source.reference-factory.mortgage",

              "jboss.naming.context.java.datasources.mortgage"

          ],

          "Services that may be the cause:" => ["jboss.jdbc-driver.ojdbc7_jar"]

      }}

       

      Can you please let me know what could be the issue? The datasource is defined as below.

       

      <datasource jta="false" jndi-name="java:/datasources/mortgage" pool-name="mortgage" enabled="true" use-java-context="true" use-ccm="true">

      <connection-url>jdbc:oracle:thin:@${db.host:localhost}:${db.port:1521}:${db.service:xe}</connection-url>

      <driver>ojdbc7.jar</driver>

                          <pool>

                              <min-pool-size>${connection.pool.init.capacity:10}</min-pool-size>

                              <max-pool-size>${connection.pool.max.capacity:200}</max-pool-size>

                          </pool>

                          <security>

                              <user-name>${db.user:username}</user-name>

                              <password>${db.password:dummypassword}</password>

                          </security>

              </datasource>

        • 1. Re: JBoss DataSource Connection Error
          claudio4j

          Is the ojdbc7.jar correctly defined in the driver's list ? See example below.

           

          <datasources>
              <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                  <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                  <driver>h2</driver>
                  <security>
                      <user-name>sa</user-name>
                      <password>sa</password>
                  </security>
              </datasource>
              <drivers>
                  <driver name="h2" module="com.h2database.h2">
                      <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                  </driver>
              </drivers>
          </datasources>