6 Replies Latest reply on Jul 12, 2012 5:51 AM by wdfink

    New missing/unsatisfied dependencies:service jboss.jdbc-driver.oracle_ojdbc (missing)

    lordsephiroth

      Hi,

      I do try to migrate a JBoss 5.1.0.GA project to JBoss 7.0.2.FINAL. I'm currently stuck on the Oracle datasource (11g) configuration. I saw many people saying this configuration was working for them. I guess I made a small mistake somewhere but cannot figure what it is.

       

      I created an oracle/ojdbc folder under the modules folder of the JBoss install. In it, I placed my ojdbc6-11.2.0.jar file.

      Here is my module.xml file :

       

      <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.0" name="oracle.ojdbc">
        <resources>
          <resource-root path="ojdbc6-11.2.0.jar"/>
        </resources>
        <dependencies>
          <module name="javax.api"/>
        </dependencies>
      </module>
      

       

      I'm using the standalone configuration for my JBoss, then I edited the standalone.xml file. I added a <system-properties> section that perfectly works.

       

      Here is my standalone.xml file (I removed most sections I did not modify) :

       

       

       <server xmlns="urn:jboss:domain:1.0">
      
          <extensions>
              <extension module="org.jboss.as.clustering.infinispan"/>
              <extension module="org.jboss.as.connector"/>
              <extension module="org.jboss.as.deployment-scanner"/>
              <extension module="org.jboss.as.ee"/>
              <extension module="org.jboss.as.ejb3"/>
              <extension module="org.jboss.as.jaxrs"/>
              <extension module="org.jboss.as.jmx"/>
              <extension module="org.jboss.as.jpa"/>
              <extension module="org.jboss.as.logging"/>
              <extension module="org.jboss.as.naming"/>
              <extension module="org.jboss.as.osgi"/>
              <extension module="org.jboss.as.pojo"/>
              <extension module="org.jboss.as.remoting"/>
              <extension module="org.jboss.as.sar"/>
              <extension module="org.jboss.as.security"/>
              <extension module="org.jboss.as.threads"/>
              <extension module="org.jboss.as.transactions"/>
              <extension module="org.jboss.as.web" />
              <extension module="org.jboss.as.weld" />
          </extensions>
      
          <system-properties>
              ....
          </system-properties>
      
          <management>
              ....
          </management>
      
          <profile>
              ....
              <subsystem xmlns="urn:jboss:domain:datasources:1.0">
                  <datasources>
                      <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
                          <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
                          <driver>h2</driver>
                          <pool></pool>
                          <security>
                              <user-name>sa</user-name>
                              <password>sa</password>
                          </security>
                      </datasource>
                      <datasource jndi-name="java:/PrestOracleDS" pool-name="OracleDS">
                          <connection-url>jdbc:oracle:thin:@##HOST##:##PORT##:##SID##</connection-url>
                          <driver>oracle.ojdbc</driver>
                          <pool>
                              <min-pool-size>5</min-pool-size>
                              <max-pool-size>100</max-pool-size>
                              <prefill>true</prefill>
                          </pool>
                          <security>
                              <user-name>##USER##</user-name>
                              <password>##PASS##</password>
                          </security>
                      </datasource>
                      <drivers>
                          <driver name="oracle.ojdbc" module="oracle.ojdbc">
                              <xa-datasource-class>oracle.jdbc.driver.OracleDriver</xa-datasource-class>
                          </driver>
                          <driver name="h2" module="com.h2database.h2">
                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                          </driver>
                      </drivers>
                  </datasources>
              </subsystem>
              ....
          </profile>
      
          <interfaces>
              ....
          </interfaces>
      
          <socket-binding-group name="standard-sockets" default-interface="public">
              ....
          </socket-binding-group>
      
      </server>
      

       

      At startup (without any deployment), I always receive :

       

      13:52:07,144 INFO  [org.jboss.as.controller] (Controller Boot Thread) Service status report

         New missing/unsatisfied dependencies:

            service jboss.jdbc-driver.oracle_ojdbc (missing)

       

      At startup (with deployment), I do receive :

       

      14:13:50,001 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => "Operation handler failed to complete"}}

       

      Any help would be greatly appreciated.

       

      Thanks in advance !

       

      Edit : added the version of Oracle I am using (11g)

       

      Edit2: I tried these configurations for the <driver> section :

       

       

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

       

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

       

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

       

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

       

      And almost any combination of one of the two first with one of the two last...

       

      Edit3 : I'm completely desperate... I tried all the same configurations again with ojdbc14.jar, the older version of the driver... the message still stay strictly the same... I start to wonder if I'm looking the right direction...

        • 1. Re: New missing/unsatisfied dependencies:service jboss.jdbc-driver.oracle_ojdbc (missing)
          wdfink

          I suppose a difference for module entry and location of files (you miss main??):

          modules.xml  ==> <module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc6">

          directory       ==>modules/com/oracle/ojdbc6/main/module.xml + ojdbc.jar

           

          drive.xa-datasource-class should be "oracle.jdbc.xa.client.OracleXADataSource"

          • 2. Re: New missing/unsatisfied dependencies:service jboss.jdbc-driver.oracle_ojdbc (missing)
            lordsephiroth

            Hi and thank you very much for the answer. I was not aware the JAR's in the "modules" folder must have a well-defined placement. I have missed this information in the documentation.

             

            I placed the JAR file in modules/com/oracle/ojdbc6/main, and now it is working fine (I have other problems, but apparently not linked to the datasource).

             

            Best regards,

            Patrick

            • 3. Re: New missing/unsatisfied dependencies:service jboss.jdbc-driver.oracle_ojdbc (missing)
              wdfink

              Do you see http://community.jboss.org/wiki/DataSourceConfigurationinAS7#Installing_a_JDBC_driver_as_a_module.

              I suppose here it should be (mostly) clear that the xml and driver are located in the sub-directory named 'main'.

              1 of 1 people found this helpful
              • 4. Re: New missing/unsatisfied dependencies:service jboss.jdbc-driver.oracle_ojdbc (missing)
                lordsephiroth

                Hi,

                I did my config based on this article:

                 

                I created, under com, a mysql directory, plus a main directory.  So, at this point it should like like the following:

                 

                jboss-7.0.0.<release>/modules/com/mysql/main

                 

                Under the main directory, you need to define your module with a module.xml file, and the actual jar file that contains your database driver.

                 

                I did not understood the "I created" as "You need this structure", but more like "I did it that way"

                Thought at the time that com/mysql/ would do the job, if the XML references correctly the paths. Small missunderstanding. But now ok, thank you.

                • 5. Re: New missing/unsatisfied dependencies:service jboss.jdbc-driver.oracle_ojdbc (missing)
                  bottleneck

                  @ Wolf-Dieter Fink,


                  Inspite of following the steps mentioned here and the doumentation, it somehow doesn't work for me.
                  I'm trying to create an oracle data source by creating a module and defining a data-source in the standalone.xml, thought, with no success.

                  Here's stating my configurations.

                   

                  1. module.xml ( @ jboss-as-web-7.0.2.Final\modules\com\oracle\ojdbc6\main )

                  <?xml version="1.0" encoding="UTF-8"?>
                  <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>

                   

                  2. ojdbc6.jar ( @ jboss-as-web-7.0.2.Final\modules\com\oracle\ojdbc6\main )

                   

                  3. Data-source definiation in standalone.xml
                  ....
                  <datasource jndi-name="java:/OracleDS" pool-name="OracleDS">
                    <connection-url>jdbc:oracle:thin:@host:port:SID</connection-url>
                    <driver>ojdbc6</driver>
                    <pool>
                     <min-pool-size>5</min-pool-size>
                     <max-pool-size>10</max-pool-size>
                     <prefill>true</prefill>
                    </pool>
                    <security>
                     <user-name>Username</user-name>
                     <password>password</password>
                    </security>
                  </datasource>
                  <drivers>
                    <driver name="ojdbc6" module="com.oracle.ojdbc6">
                     <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 know this might sound stupid, but I still get the error when server starts saying -  New missing/unsatisfied dependencies:service jboss.jdbc-driver.ojdbc6 (missing)

                   

                  Would appreciate if you could point out my mistake, if any.

                  • 6. Re: New missing/unsatisfied dependencies:service jboss.jdbc-driver.oracle_ojdbc (missing)
                    wdfink

                    I would recommend to use the 7.1.1.Final version first.

                     

                    You should do it step by step,

                    - first start the fresh server to see that all works

                    - add the oracle driver as module, you should see that the driver is started

                    - add the datasource