title: jboss-eap-6.1 oracle driver definition when installed as deployment
body: <p>I have several Jboss EAP 6.1 installations working with Oracle driver installed as a module. </p>
  
  <p>This is the standard configuration I use in standalone.xml:</p>
  
  <pre><code>&lt;datasource jndi-name="java:jboss/fooDatasource" pool-name="java:jboss/fooDatasource" enabled="true" use-java-context="false" &gt;
   &lt;connection-url&gt;jdbc:oracle:thin:@1.2.3.4:1527/SOMEDB.foo&lt;/connection-url&gt;
   &lt;driver&gt;oracle&lt;/driver&gt;
       &lt;security&gt;
           &lt;user-name&gt;xxxxx&lt;/user-name&gt;
               &lt;password&gt;xxxxxxxxx&lt;/password&gt;
       &lt;/security&gt;
   [...]
  &lt;/datasource&gt;
  &lt;driver name="oracle" module="oracle.jdbc"&gt;
      &lt;xa-datasource-class&gt;oracle.jdbc.xa.client.OracleXADataSource&lt;/xa-datasource-class&gt;
      &lt;datasource-class&gt;oracle.jdbc.OracleDriver&lt;/datasource-class&gt;
  &lt;/driver&gt;
  </code></pre>
  
  <p>The ojdbc6.jar is in $JBOSS_HOME/modules/system/layers/base/oracle/jdbc/main/ together with the appropriate module.xml and everything works fine.</p>
  
  <p>Now a customer required to install the driver as a deployment, so I moved ojdbc6.jar to $JBOSS_HOME/standalone/deployments/ and I see from logs that it is deployed without errors:</p>
  
  <pre><code>[org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
  INFO  [org.jboss.as.server] (ServerService Thread Pool -- 25) JBAS018559: Deployed "ojdbc6.jar" (runtime-name : "ojdbc6.jar")
  </code></pre>
  
  <p>But I don't know how to edit my standalone.xml to make it work again: i tried to edit the driver definition "module" attribute with several different values (ojdbc6.jar, deployment.ojdbc6.jar, oracle.jdbc.OracleDriver...) but none seem to "match" and Jboss keeps throwing errors at startup: </p>
  
  <pre><code>ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 24) JBAS014613: Operation ("add") failed - address: ([
  ("subsystem" =&gt; "datasources"),
  ("jdbc-driver" =&gt; "oracle")
  ]) - failure description: "JBAS010441: Failed to load module for driver [ojdbc6.jar]"
  [...]
  INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
  JBAS014775:    New missing/unsatisfied dependencies:
    service jboss.jdbc-driver.oracle (missing) dependents: [service jboss.driver-demander.java:jboss/spiDatasource, service jboss.data-source.java:jboss/fooDatasource]
  </code></pre>
  
  <p>Could anyone please provide a working example of the driver definition?</p>
  
  <p>Thanks</p>