JBoss Community

XA Datasource -- apparently can't find driver

created by Matt Drees in JBoss AS7 Development - View the full discussion

Hi all,

 

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.

 

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. 

 

Relevant standalone.xml snippet:

 

        <subsystem xmlns="urn:jboss:domain:datasources:1.0">
            <datasources>
                <xa-datasource jndi-name="java:jdbc/primaryCcpDatasource" pool-name="primaryCcpDatasourcePool" enabled="true" use-java-context="true">
                    <xa-datasource-property name="URL">
                        jdbc:oracle:thin:@ (DESCRIPTION = ...boring... )
                    </xa-datasource-property>
                    <xa-datasource-property name="User">
                        ccp
                    </xa-datasource-property>
                    <xa-datasource-property name="Password">
                        password
                    </xa-datasource-property>
                    <xa-datasource-class>
                        oracle.jdbc.xa.client.OracleXADataSource
                    </xa-datasource-class>
                    <driver>
                        oracle.jdbc.OracleDriver#11.2
                    </driver>
                    <xa-pool>
                        <min-pool-size>
                            1
                        </min-pool-size>
                        <max-pool-size>
                            5
                        </max-pool-size>
                        <prefill>
                            true
                        </prefill>
                        <use-strict-min>
                            false
                        </use-strict-min>
                        <is-same-rm-override>
                            false
                        </is-same-rm-override>
                        <no-tx-separate-pools/>
                        <pad-xid>
                            false
                        </pad-xid>
                        <wrap-xa-resource>
                            false
                        </wrap-xa-resource>
                    </xa-pool>
                    <validation>
                        <validate-on-match>
                            false
                        </validate-on-match>
                        <background-validation>
                            true
                        </background-validation>
                        <useFastFail>
                            false
                        </useFastFail>
                    </validation>
                </xa-datasource>
                <drivers>
                    <driver name="oracle" 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>
            </datasources>
        </subsystem>

 

 

My oracle jdbc driver module looks like this:

 

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>

 

 

Log output:

 

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)

 

 

 

Does my configuration look correct? 

 

Thanks for your time!

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community