1 2 Previous Next 18 Replies Latest reply on Sep 28, 2012 9:52 AM by bpmm

    Oracle datasource - missing/unsatisfied dependencies

    iapazmino

      Hello, I'm trying to setup an oracle datasource using ojdbc14 but it fails with the following message

       

         New missing/unsatisfied dependencies:
            service jboss.jdbc-driver.oracle_jdbc_OracleDriver#10_2 (missing)
      

       

      I found a thread in the dev-mailing-list suggesting the driver shoud be changed with a 11g driver, so I switched to ojdbc6, but the same error arises.

      Both jars were configured as modules using the following descriptor, changing names of course:

       

      <module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc6">
        <resources>
          <resource-root path="ojdbc6.jar"/>
          <!-- resource-root path="ojdbc14.jar"/ -->
        </resources>
        <dependencies>
          <module name="javax.api"/>
          <!-- module name="javax.transaction.api"/ -->
        </dependencies>
      </module>
      

       

      The datasource itsef is defined as

       

      <datasource jndi-name="appDS" pool-name="OracleDS" enabled="true" use-java-context="true">
          <connection-url>jdbc:oracle:thin:@url:port:sid</connection-url>
          <driver>oracle.jdbc.driver.OracleDriver#10.2</driver>
          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
          <pool>
              <prefill>true</prefill>
              <use-strict-min>false</use-strict-min>
          </pool>
          <security>
              <user-name>xxy</user-name>
              <password>xxy</password>
          </security>
          <validation>
              <validate-on-match>false</validate-on-match>
              <background-validation>false</background-validation>
              <useFastFail>false</useFastFail>
          </validation>
          <statement />
      </datasource>
      

       

      and the module installed as a driver

       

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

       

      What am I missing?

      Thanks in advance.

        • 1. Re: Oracle datasource - missing/unsatisfied dependencies
          jesper.pedersen

          The <driver> part should reference the 'name' attribute in the <drivers> section - hence "oracle".

           

          See https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-DatasourceDefinitions

          • 2. Re: Oracle datasource - missing/unsatisfied dependencies
            iapazmino

            Thanks a lot, after a bit more tweaking the final result is the following just in case anyone find it useful

             

            JBOSS_HOME/modules/com/oracle/ojdbc6/main/module.xml

             

            <module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc6">
              <resources>
                <resource-root path="ojdbc6.jar"/>
            
              </resources>
              <dependencies>
                <module name="javax.api"/>
              </dependencies>
            </module>
            

             

            datasource

             

            <datasource jndi-name="AdmDS" pool-name="OracleDS" enabled="true" use-java-context="true" jta="true">
                <connection-url>jdbc:oracle:thin:@url:port:sid</connection-url>
                <driver>oracle</driver>
                <pool>
                    <prefill>true</prefill>
                    <use-strict-min>false</use-strict-min>
                </pool>
                <security>
                    <user-name>xx</user-name>
                    <password>xx</password>
                </security>
                <validation>
                    <validate-on-match>false</validate-on-match>
                    <background-validation>false</background-validation>
                    <useFastFail>false</useFastFail>
                </validation>
                <statement />
            </datasource>
            

             

            driver

             

            <driver name="oracle" module="com.oracle.ojdbc6">
                <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
            </driver>
            
            • 3. Re: Oracle datasource - missing/unsatisfied dependencies
              jboss_queries

              Hi,

               

                I was configuring jboss 7 but getting missing/unsatisfied dependencies error.

               

              module.xml looks like this

              modules\com\informix\jdbc\main

               

               

              <module xmlns="urn:jboss:module:1.0" name="com.informix.jdbc">

                <resources>

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

                      <!-- Insert resources here -->

                </resources>

                <dependencies>

                  <module name="javax.api"/>

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

                </dependencies>

              </module>

               

              And the datasources part in standalone.xml is as below.

               

              <datasources>

                              <datasource jndi-name="agDataSource" enabled="true" use-java-context="true" pool-name="agDataSource">

                                  <connection-url>my conne url</connection-url>

                                  <driver>informix-db</driver>

                                  <pool></pool>

                                  <security>

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

                                      <password>pwd</password>

                                  </security>

                                  <validation></validation>

                                  <timeout></timeout>

                                  <statement></statement>

                              </datasource>

                              <drivers>

                                  <driver name="informix-db" module="com.informix.jdbc">

                                      <xa-datasource-class>com.informix.jdbc.IfxDriver</xa-datasource-class>

                                  </driver>

                              </drivers>

                          </datasources>

               

               

              Please let me know where I am going wrong.

              • 4. Re: Oracle datasource - missing/unsatisfied dependencies
                piotr.komisarski

                Hi.

                 

                I'm also struggling with datasource conf.

                I had an idea to migrate to jboss7, but now I'm wondering if it's really a good idea.

                 

                My standalone.xml:

                 

                          <xa-datasource jndi-name="java:jdbc/letterDS" pool-name="letterPool">

                                   <driver>oracleDriver</driver>

                                   <xa-datasource-property name="URL">jdbc:oracle:thin:@127.0.0.1:1521:XE</xa-datasource-property>

                                   <xa-pool>

                                        <min-pool-size>10</min-pool-size>

                                        <max-pool-size>20</max-pool-size>

                                        <prefill>true</prefill>

                                   </xa-pool>

                                   <security>

                                        <user-name>letter</user-name>

                                        <password>letter</password>

                                   </security>

                                </xa-datasource>

                                <drivers>

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

                                        <xa-datasource-class>

                                            oracle.jdbc.xa.client.OracleXADataSource

                                        </xa-datasource-class>

                                    </driver>

                                    <driver name="h2" module="com.h2database.h2">

                                        <xa-datasource-class>

                                            org.h2.jdbcx.JdbcDataSource

                                        </xa-datasource-class>

                                    </driver>

                                </drivers>

                 

                I have folder

                ...\modules\com\oracle\ojdbc14\main

                 

                and in this folder module.xml :

                 

                <?xml version="1.0" encoding="UTF-8"?>

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

                        <resources>

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

                        </resources>

                        <dependencies>

                            <module name="javax.api"/>

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

                        </dependencies>

                    </module>

                 

                End I'm ending with :

                 

                   New missing/unsatisfied dependencies:

                      service jboss.jdbc-driver.oracleDriver (missing)

                 

                help..

                • 5. Re: Oracle datasource - missing/unsatisfied dependencies
                  maeste

                  ojdb14.jar isn't a jdbc4 compliant drive, so we can't desume from META-INF the dirver class and you have to specify it in standalone.xml this way:

                   

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

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

                       <xa-datasource-class>

                            oracle.jdbc.xa.client.OracleXADataSource

                       </xa-datasource-class>

                  </driver>

                  If you use ojdbc6.jar that is jdbc4 compliant you don't need this line because we read it from jar's META-INF.

                   

                  Note also that currently the only supported jndi names have to start with java:/ or java:jboss/

                   

                  regards

                  S.

                  • 6. Re: Oracle datasource - missing/unsatisfied dependencies
                    jaikiran

                    Stefano Maestri wrote:

                     

                    ojdb14.jar isn't a jdbc4 compliant drive, so we can't desume from META-INF the dirver class and you have to specify it in standalone.xml this way:

                     

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

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

                         <xa-datasource-class>

                              oracle.jdbc.xa.client.OracleXADataSource

                         </xa-datasource-class>

                    </driver>

                    Is this something we can make more clear in the error message by logging that the driver-class is missing for that driver configuration?

                    • 7. Re: Oracle datasource - missing/unsatisfied dependencies
                      piotr.komisarski

                      hm.

                      Still the same:

                       

                        New missing/unsatisfied dependencies:

                           service jboss.jdbc-driver.oracleDriver (missing)

                      • 8. Re: Oracle datasource - missing/unsatisfied dependencies
                        piotr.komisarski

                        Tried also "oracle.jdbc.driver.OracleDriver", because this is driver class.

                        But still -  missing service

                        • 9. Re: Oracle datasource - missing/unsatisfied dependencies
                          piotr.komisarski

                          maybe it's important:

                          during stopping jboss i have this entry in logs:

                           

                          09:08:40,921 INFO  [org.jboss.as.controller] Service status report

                             Newly corrected services:

                                service jboss.jdbc-driver.oracleDriver (no longer required)

                          • 10. Re: Oracle datasource - missing/unsatisfied dependencies
                            maeste

                            I have tried to configure an OrcalDriver on my machine and it's working.

                            Please double check the module and the driver part. Is ojdbc14.jar (_g in your case) available in main directory of the module?

                            I was getting the error without specifying the driver-class, but it has gone fixing standalaone.xml.

                             

                            regards

                            S.

                            • 11. Re: Oracle datasource - missing/unsatisfied dependencies
                              piotr.komisarski

                              I didn't double-checked everything.

                               

                              I even ten-checked everything.

                               

                              But now i've found what was wrong in my conf.

                               

                              My module.xml had space as a first character in file.

                              When i removed this space i have beautiful entry:

                               

                              Bound data source [java:letterDS]

                               

                               

                              Thanks Stefano for your help !

                              • 12. Re: Oracle datasource - missing/unsatisfied dependencies
                                tc7

                                Creating an Informix JDBC module for JBoss AS 7.0.1

                                I found the following worked for me using Informix JDBC v3.70.JC3

                                 

                                standalone-preview.xml:

                                 

                                                <datasource jndi-name="myAppDS" pool-name="MyAppDS" enabled="true" jta="true" use-java-context="false" use-ccm="true">

                                                    <connection-url>jdbc:informix-sqli://localhost:<port>/<dbname>:INFORMIXSERVER=<dbservername></connection-url>

                                                    <driver>ifxjdbc</driver>

                                                    <pool>

                                                        <min-pool-size>3</min-pool-size>

                                                        <max-pool-size>20</max-pool-size>

                                                        <prefill>true</prefill>

                                                        <use-strict-min>false</use-strict-min>

                                                        <flush-strategy>FailingConnectionOnly</flush-strategy>

                                                    </pool>

                                                    <security>

                                                        <user-name>someuser</user-name>

                                                        <password>somepasswd</password>

                                                    </security>

                                                </datasource>

                                 

                                ...

                                 

                                                <drivers>

                                                    <!-- h2 for reference -->

                                                    <driver name="h2" module="com.h2database.h2">

                                                        <xa-datasource-class>

                                                            org.h2.jdbcx.JdbcDataSource

                                                        </xa-datasource-class>

                                                    </driver>

                                                     <!-- informix driver referenced above -->

                                                    <driver name="ifxjdbc" module="com.informix.jdbc.3_7_0">

                                                        <driver-class>

                                                            com.informix.jdbc.IfxDriver

                                                        </driver-class>

                                                    </driver>

                                                </drivers>

                                 

                                and created the following module.xml in com/informix/jdbc/3_7_0/main:

                                <module xmlns="urn:jboss:module:1.0" name="com.informix.jdbc.3_7_0">

                                  <resources>

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

                                  </resources>

                                  <dependencies>

                                    <module name="javax.api"/>

                                  </dependencies>

                                </module>

                                 

                                And included the vanilla ifxjdbc.jar alongside module.xml

                                 

                                I hope this helps someone else!

                                • 13. Re: Oracle datasource - missing/unsatisfied dependencies
                                  salecha.rohit

                                  Hi my module.xml looks like this 

                                  <module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc14">
                                    <resources>
                                      <resource-root path="ojdbc14.jar"/>
                                    </resources>
                                    <dependencies>
                                      <module name="javax.api"/>
                                      <module name="javax.transaction.api"/>
                                    </dependencies>
                                  </module>
                                  

                                  my standalone.xml driver part looks like this

                                   

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

                                                     

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

                                  but i still get the missing errro

                                  I also added the driver-class yet it shows the same errrorrr

                                  • 14. Re: Oracle datasource - missing/unsatisfied dependencies
                                    salecha.rohit

                                    can yopu please post ur module and standalone xmls pleasee. uit'll be very helpful

                                    1 2 Previous Next