4 Replies Latest reply on Aug 30, 2013 6:00 AM by Frank Langelage

    How to refer to the jdbc module if the driver is registered as deployment

    Lord of Bugs Newbie

      Hi, everyone

       

      I just deploy ojdbc6.jar in AS7 as a regular jar file, and I have this confirmation message from console:

       

      10:56:20,416 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "ojdbc6.jar"

      10:56:21,487 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (

      version 11.2)

      10:56:21,489 INFO  [org.jboss.as.osgi] (MSC service thread 1-7) JBAS011907: Register module: Module "deployment.ojdbc6.jar:main" from Service Module Loader

      10:56:21,499 INFO  [org.jboss.as.server] (HttpManagementService-threads - 6) JBAS018559: Deployed "ojdbc6.jar"

       

      So I took the module name of such ojdbc driver deployment as "deployment.ojdbc6.jar:main", so I add this module as dependency into another application:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
        <deployment>
        <dependencies>
             <module name="deployment.ojdbc6.jar:main" />
        </dependencies>
        <exclusions>
             <module name="org.apache.log4j" />
             <module name="org.apache.commons.logging" />
             <module name="org.jboss.logging" />
             <module name="org.jboss.logging.jul-to-slf4j-stub" />
             <module name="org.jboss.logmanager" />
             <module name="org.jboss.logmanager.log4j" />
             <module name="org.slf4j" />
        </exclusions>
        </deployment>
      </jboss-deployment-structure>
      
      
      
      
      

       

      unfortunately, when I deploy the application, it gives me:

      10:59:34,448 INFO  [org.jboss.as.server] (HttpManagementService-threads - 7) JBAS015870: Deploy of deployment "MyApp.war" was rolled back

      with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"MyApp.war.war\".POST_MODULE

      Missing[JBAS014861: <one or more transitive dependencies>]","jboss.module.service.\"deployment.MyApp.war.war\".main Missing[jboss.module.spec.service.\"deployment.ojdbc6.jar:main\".main]"]}

      10:59:35,198 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment MyApp.war.war in 749ms

       

      So now Jboss complaining about it cannot find the module, is there something I missed in the configuration, why the application cannot find the module then?

      How to refer to the jdbc driver if register as deployment?

       

      Another question is, to make various deployments and use this jdbc driver at same time, is it necessary to register this jdbc jar as global module in standalone.xml?

       

      Thanks in advance.