<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
XA Datasource -- apparently can't find driver
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/matt.drees">Matt Drees</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/606577#606577">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi all,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm trying to evaluate if my project (currently targeting AS6) can be switched over to AS7.  So I'll probably be posting more of these questions as I try to adapt the project.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm trying to set up an XA Oracle datasource.  I've set up a "com.oracle.ojdbc" module containing the oracle driver, and am trying to use it in my DS config.  The log output (below) makes me think the driver is being discovered and registered correctly.  However, the log output also seems to indicate that the datasource can't find the driver.  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Relevant standalone.xml snippet:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml">        <span class="jive-xml-tag"><subsystem xmlns="urn:jboss:domain:datasources:1.0"></span>
            <span class="jive-xml-tag"><datasources></span>
                <span class="jive-xml-tag"><xa-datasource jndi-name="java:jdbc/primaryCcpDatasource" pool-name="primaryCcpDatasourcePool" enabled="true" use-java-context="true"></span>
                    <span class="jive-xml-tag"><xa-datasource-property name="URL"></span>
                        jdbc:oracle:thin:@ (DESCRIPTION = ...boring... )
                    <span class="jive-xml-tag"></xa-datasource-property></span>
                    <span class="jive-xml-tag"><xa-datasource-property name="User"></span>
                        ccp
                    <span class="jive-xml-tag"></xa-datasource-property></span>
                    <span class="jive-xml-tag"><xa-datasource-property name="Password"></span>
                        password
                    <span class="jive-xml-tag"></xa-datasource-property></span>
                    <span class="jive-xml-tag"><xa-datasource-class></span>
                        oracle.jdbc.xa.client.OracleXADataSource
                    <span class="jive-xml-tag"></xa-datasource-class></span>
                    <span class="jive-xml-tag"><driver></span>
                        oracle.jdbc.OracleDriver#11.2
                    <span class="jive-xml-tag"></driver></span>
                    <span class="jive-xml-tag"><xa-pool></span>
                        <span class="jive-xml-tag"><min-pool-size></span>
                            1
                        <span class="jive-xml-tag"></min-pool-size></span>
                        <span class="jive-xml-tag"><max-pool-size></span>
                            5
                        <span class="jive-xml-tag"></max-pool-size></span>
                        <span class="jive-xml-tag"><prefill></span>
                            true
                        <span class="jive-xml-tag"></prefill></span>
                        <span class="jive-xml-tag"><use-strict-min></span>
                            false
                        <span class="jive-xml-tag"></use-strict-min></span>
                        <span class="jive-xml-tag"><is-same-rm-override></span>
                            false
                        <span class="jive-xml-tag"></is-same-rm-override></span>
                        <span class="jive-xml-tag"><no-tx-separate-pools/></span>
                        <span class="jive-xml-tag"><pad-xid></span>
                            false
                        <span class="jive-xml-tag"></pad-xid></span>
                        <span class="jive-xml-tag"><wrap-xa-resource></span>
                            false
                        <span class="jive-xml-tag"></wrap-xa-resource></span>
                    <span class="jive-xml-tag"></xa-pool></span>
                    <span class="jive-xml-tag"><validation></span>
                        <span class="jive-xml-tag"><validate-on-match></span>
                            false
                        <span class="jive-xml-tag"></validate-on-match></span>
                        <span class="jive-xml-tag"><background-validation></span>
                            true
                        <span class="jive-xml-tag"></background-validation></span>
                        <span class="jive-xml-tag"><useFastFail></span>
                            false
                        <span class="jive-xml-tag"></useFastFail></span>
                    <span class="jive-xml-tag"></validation></span>
                <span class="jive-xml-tag"></xa-datasource></span>
                <span class="jive-xml-tag"><drivers></span>
                    <span class="jive-xml-tag"><driver name="oracle" module="com.oracle.ojdbc6"></span>
                        <span class="jive-xml-tag"><xa-datasource-class></span>
                            oracle.jdbc.xa.client.OracleXADataSource
                        <span class="jive-xml-tag"></xa-datasource-class></span>
                    <span class="jive-xml-tag"></driver></span>
                    <span class="jive-xml-tag"><driver name="h2" module="com.h2database.h2"></span>
                        <span class="jive-xml-tag"><xa-datasource-class></span>
                            org.h2.jdbcx.JdbcDataSource
                        <span class="jive-xml-tag"></xa-datasource-class></span>
                    <span class="jive-xml-tag"></driver></span>
                <span class="jive-xml-tag"></drivers></span>
            <span class="jive-xml-tag"></datasources></span>
        <span class="jive-xml-tag"></subsystem></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My oracle jdbc driver module looks like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code">matt-dreess-macbook-pro:jboss-7.0.0.Beta4-SNAPSHOT mattdrees$ find modules/com/oracle/ojdbc6
modules/com/oracle/ojdbc6
modules/com/oracle/ojdbc6/main
modules/com/oracle/ojdbc6/main/module.xml
modules/com/oracle/ojdbc6/main/ojdbc6_g-11.2.0.1.0.jar
modules/com/oracle/ojdbc6/main/ojdbc6_g-11.2.0.1.0.jar.index
matt-dreess-macbook-pro:jboss-7.0.0.Beta4-SNAPSHOT mattdrees$
matt-dreess-macbook-pro:jboss-7.0.0.Beta4-SNAPSHOT mattdrees$ cat modules/com/oracle/ojdbc6/main/module.xml
<module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc6">
  <resources>
    <resource-root path="ojdbc6_g-11.2.0.1.0.jar"/>
  </resources>
   <dependencies>
     <module name="javax.api"/>
     <module name="javax.transaction.api"/>
   </dependencies>
</module></code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Log output:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code">matt-dreess-macbook-pro:jboss-7.0.0.Beta4-SNAPSHOT mattdrees$ bin/standalone.sh
=========================================================================
  JBoss Bootstrap Environment
  JBOSS_HOME: /Users/mattdrees/Scratch/jboss-7.0.0.Beta4-SNAPSHOT
  JAVA: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
  JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
=========================================================================
11:32:25,483 INFO  [org.jboss.modules] JBoss Modules version 1.0.0.CR2
11:32:25,885 INFO  [org.jboss.msc] JBoss MSC version 1.0.0.Beta8
11:32:25,951 INFO  [org.jboss.as] JBoss AS 7.0.0.Beta4-SNAPSHOT "(TBD)" starting
11:32:27,078 INFO  [org.jboss.as.server] Activating core services
11:32:27,283 INFO  [org.jboss.as] creating native management service using network interface (default) port (9999)
11:32:27,291 INFO  [org.jboss.as] creating http management service using network interface (default) port (9990) securePort (-1)
11:32:27,314 INFO  [org.jboss.as.arquillian] Activating Arquillian Subsystem
11:32:27,335 INFO  [org.jboss.as.ee] Activating EE subsystem
11:32:27,438 INFO  [org.jboss.as.naming] Activating Naming Subsystem
11:32:27,457 INFO  [org.jboss.as.clustering.infinispan.subsystem] Activating Infinispan subsystem.
11:32:27,536 INFO  [org.jboss.as.security] Activating Security Subsystem
11:32:28,065 INFO  [org.jboss.as.connector.subsystems.datasources] Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
11:32:28,077 INFO  [org.jboss.as.connector.subsystems.datasources] Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)
11:32:28,080 INFO  [org.jboss.as.osgi] Activating OSGi Subsystem
11:32:28,599 INFO  [org.jboss.as.webservices] Activating WebServices Extension
11:32:28,857 INFO  [org.jboss.as.naming] Starting Naming Service
11:32:28,861 INFO  [org.jboss.as.logging] Removing bootstrap log handlers
11:32:28,963 INFO  [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-4) Starting remote JMX connector
11:32:28,986 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 3.1.0.Beta2
11:32:29,038 WARN  [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC service thread 1-3) Unable to set the URLStreamHandlerFactory
11:32:29,040 WARN  [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC service thread 1-3) Unable to set the ContentHandlerFactory
11:32:29,072 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
11:32:29,248 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) live server is starting..
11:32:29,436 INFO  [org.jboss.as.connector] (MSC service thread 1-3) Starting JCA Subsystem (JBoss IronJacamar 1.0.0.Beta6)
11:32:29,583 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-1) Started Netty Acceptor version 3.2.1.Final-r2319 localhost:5455 for CORE protocol
11:32:29,589 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-1) Started Netty Acceptor version 3.2.1.Final-r2319 localhost:5445 for CORE protocol
11:32:29,591 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) HornetQ Server version 2.1.2.Final (Colmeia, 120) started
11:32:29,726 INFO  [org.jboss.as.server] (MSC service thread 1-3) Service status report
   New missing/unsatisfied dependencies:
      service jboss.jdbc-driver."oracle.jdbc.OracleDriver#11.2" (missing) required by [service jboss.data-source.java:/java:jdbc/primaryCcpDatasource]
11:32:29,726 ERROR [org.jboss.as] (MSC service thread 1-3) JBoss AS 7.0.0.Beta4-SNAPSHOT "(TBD)" started (with errors) in 4758ms - Started 106 of 163 services (3 services failed or missing dependencies, 54 services are passive or on-demand)
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Does my configuration look correct?  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks for your time!</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/606577#606577">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>