Driver 9.1 Connection does not have a registered XAResource

From: Jason Free <jfree(at)sms-fed(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Driver 9.1 Connection does not have a registered XAResource
Date: 2012-02-17 17:15:07
Message-ID: CA+9HO5NTXj_FShMV0SV_r1PdKvdDwHKuZWQURyHOYgNNxSHhDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I downloaded an installed PostgreSQL 9.1 and am using it in a XA
transaction (with an Oracle 11 database). The Transaction Manager is
Atomikos. When connecting to the PostgreSQL db (and enlisting it in the
transaction) I get the following stacktrace:

INFO: Connection does not have a registered XAResource
jdbc:postgresql://X.X.X.X:5432/postgres?loginTimeout=0&socketTimeout=0&prepareThreshold=5&unknownLength=2147483647&loglevel=0&tcpkeepalive=false,
UserName=myuserid, PostgreSQL Native Driver
java.sql.SQLException: Connection does not have a registered XAResource
jdbc:postgresql://X.X.X.X:5432/postgres?loginTimeout=0&socketTimeout=0&prepareThreshold=5&unknownLength=2147483647&loglevel=0&tcpkeepalive=false,
UserName=myuserid, PostgreSQL Native Driver
at
org.apache.commons.dbcp.managed.TransactionRegistry.getXAResource(TransactionRegistry.java:78)
at
org.apache.commons.dbcp.managed.TransactionContext.setSharedConnection(TransactionContext.java:88)
at
org.apache.commons.dbcp.managed.ManagedConnection.updateTransactionStatus(ManagedConnection.java:131)
at
org.apache.commons.dbcp.managed.ManagedConnection.<init>(ManagedConnection.java:55)
at
org.apache.commons.dbcp.managed.ManagedDataSource.getConnection(ManagedDataSource.java:77)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)

This happens with the "9.1-901 JDBC 4" and "9.0-802 JDBC 4" drivers, but
connecting to my 9.1 database with the "8.4-703 JDBC 4" driver works
perfectly. Did the behavior somehow change in 9.x? Do I (or the
transaction manager) have to do something differently or is this a bug?

Thanks,
-Jason

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jan Torben Heuer 2012-02-28 16:14:34 IndexOutOfBoundsException in org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1720)
Previous Message Ned Wolpert 2012-02-16 21:58:13 Re: Upgrade question, going from 8.3 to 9.1...