Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group