Cannot use JDBC 2.0 Thin drivers with XA...

From: John O'Shea <joshea_at_iona.com>
Date: 2000/07/05
Message-ID: <39637110.F415A2C5_at_iona.com>#1/1


[Quoted] Hi All,

 Using Oracle's JDBC2.0 drivers (for JDK2) to connect to an Oracle8.1.5 database I have no problem opening a normal Connections but I am hitting problems using XAConnections.

I open the oracle.jdbc.xa.client.XAConnection and then try enlist the Oracle resource with my Transaction Manager. As part of this, my code calls oracle.jdbc.xa.OracleXAResource.start() and supplies the TX ID and XAResource.TMJOIN. However, I get a weird SQLException back (stack trace below) which I think is hinting that my database somehow isn't properly configured to support these XA-enabled drivers.

 When I look at the Oracle8.1.5 docs it does mention that the DBA is supposed to define the xa_open string in cooperation with the application developer. Thing is, the JDBC 2.0 XA API doesn't expose xa_open to the application developer (me) so I presume it is being called from within the Oracle drivers. Does anyone know what this string is? Or am I missing something more obvious?

Any ideas appreciated? There's nothing on technet or in the driver JavaDoc's indicating how to configure an Oracle server to work with these drivers. (my code works fine with Merant's Sequelink 5 drivers.)

[error] java.sql.SQLException: ORA-06550: line 1, column 14:
[error] PLS-00201: identifier 'JAVA_XA.XA_START' must be declared
[error] ORA-06550: line 1, column 8:
[error] PL/SQL: Statement ignored
[error]
[error] at

oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java, Compiled Code)
[error] at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java,
Compiled Code)
[error] at oracle.jdbc.ttc7.Oall7.receive(Oall7.java, Compiled
Code)
[error] at

oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java, Compiled Code)
[error] at

oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java, Compiled Code)
[error] at

oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java, Compiled Code)
[error] at

oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java, Compiled Code)
[error] at

oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java, Compiled Code)
[error] at

oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java, Compiled Code)
[error] at

oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java, Compiled Code)
[error] at

[Quoted] oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java, Compiled Code)
[error] at

[Quoted] oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java, Compiled Code)
[error] at

[Quoted] oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java, Compiled Code)
[error] at

com.iona.j2ee.ejb.container.transaction.TransactionImpl.enlistResource(TransactionImpl.java, Compiled Code)
[error] at

[Quoted] com.iona.j2ee.ejb.container.datasource.DataSource.getXAConnection(DataSource.java, Compiled Code)
[error] at

[Quoted] com.iona.j2ee.ejb.container.datasource.DataSource.getConnection(DataSource.java, Compiled Code)
[error] at

[Quoted] datasource.DataSourceTest.testGetConnectionInsideATx(DataSourceTest.java, Compiled Code)
[error] at java.lang.reflect.Method.invoke(Native Method)
[error] at junit.framework.TestCase.runTest(TestCase.java,
Compiled Code)
[error] at junit.framework.TestCase.runBare(TestCase.java,
Compiled Code)
[error] at junit.framework.TestResult.run(TestResult.java,
Compiled Code)
[error] at junit.framework.TestCase.run(TestCase.java, Compiled
Code)
[error] at junit.framework.TestSuite.run(TestSuite.java,
Compiled Code)
[error] at junit.ui.TestRunner$12.run(TestRunner.java, Compiled
Code)

--
John O'Shea                              joshea at iona dot com
iPortal Application Server Development,
IONA Technologies, Shelbourne Road, Dublin 4, Ireland.
Received on Wed Jul 05 2000 - 00:00:00 CEST

Original text of this message