Error when tyring to Lookup Oracle Datasource from an application

Solution Unverified - Updated -

Issue

  • When trying to connect to Oracle Database from JBoss server, getting below errors in server.log file
...
...
Caused by: javax.resource.ResourceException: Could not create connection
    at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:447)
    at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:385)
    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)
    at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)
    ... 126 more
Caused by: java.sql.SQLException: Invalid Oracle URL specified
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:441)
    at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
    at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:469)
    at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:156)
    at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:130)
    at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:430)
    ... 129 more
...
...

The Datasource configuration contains :

<xa-datasource jndi-name="java:/jdbc/OracleDSFinal" pool-name="oracleDSFinal" enabled="true" use-ccm="false">
                        <xa-datasource-property name="URL">
                            jdbc:oracle:thin@10.10.10.10:1521:abcd1213
                        </xa-datasource-property>
                        <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
                        <driver>oracleXA</driver>
                        <new-connection-sql>select 1 from dual</new-connection-sql>
...
...

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.0
  • Oracle Database

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.