Failover for XA Datasource in URL not working in JBoss EAP

Solution Verified - Updated -

Issue

  • Supplying Failover Connection to XA Datasource in URL not working
  • server.log entry similar to
ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000906: Error during crash recovery: java:/<datasource> (Could not create connection): javax.resource.ResourceException: Could not create connection
        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:461)
        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:398)
        at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl.open(XAResourceRecoveryImpl.java:343)
        at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl.getXAResources(XAResourceRecoveryImpl.java:170)
        at com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper.getXAResources(XAResourceRecoveryHelperWrapper.java:51) [jbossjts-integration-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:516) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:182) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
        at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:743) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
        at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.15.Final-redhat-4.jar:4.17.15.Final-redhat-4]
Caused by: java.sql.SQLRecoverableException: I/O-Fehler: Invalid connection string format, a valid format is: "host:port:sid"
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
        at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:280)
        at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:472)
        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:444)
        ... 8 more
Caused by: oracle.net.ns.NetException: Invalid connection string format, a valid format is: "host:port:sid"
        at oracle.net.resolver.AddrResolution.resolveSimple(AddrResolution.java:504)
        at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:437)
        at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:693)
        at oracle.net.ns.NSProtocol.connect(NSProtocol.java:251)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1140)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:340)
        ... 17 more

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.2.0
  • xa-datasource as defined in
    • jboss-as-datasources_1_0.xsd
    • jboss-as-datasources_1_1.xsd
    • jboss-as-resource-adapters_1_0.xsd
    • jboss-as-resource-adapters_1_1.xsd

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