Re: XA capable driver

From: "G(dot)L(dot) Grobe" <gary(at)grobe(dot)net>
To: "Aaron Mulder" <ammulder(at)alumni(dot)princeton(dot)edu>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: XA capable driver
Date: 2002-08-01 06:13:05
Message-ID: 004d01c23922$801498e0$0500a8c0@trinity
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> If there's any "postgresql" in the error/warning/stack trace,
> please post it here. Otherwise, perhaps you could just e-mail it to me
> off-list.

Ok, I've included the output below as well as the code that's exec'ing below
that. Note that no exceptions are thrown while exec'ing the code as shown. I
didn't see anything that actually came from postgres itself. This output
came from JBoss 2.4.4 and it's been unanimous from the JBoss forums that
this is a problem of the driver not being XA capable. This all seems to
happen after the method has fully completed and is called from within a MDB.

[WARN,TxCapsule] XAException: tx=XidImpl [FormatId=257,
GlobalId=cassia//182, BranchQual=] errorCode=XAER_RMERR
javax.transaction.xa.XAException
at org.jboss.mq.SpyXAResource.prepare(SpyXAResource.java:169)
at org.jboss.tm.TxCapsule.prepareResources(TxCapsule.java:1411)
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:330)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
at
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:314)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageCons
umer.java:565)
at
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
at org.jboss.mq.SpySession.run(SpySession.java:248)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:172)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja
va:728)
at java.lang.Thread.run(Thread.java:484)
[WARN,TxCapsule] XAException: tx=XidImpl [FormatId=257,
GlobalId=cassia//182, BranchQual=] errorCode=XAER_RMERR
javax.transaction.xa.XAException
at org.jboss.mq.SpyXAResource.rollback(SpyXAResource.java:201)
at org.jboss.tm.TxCapsule.rollbackResources(TxCapsule.java:1540)
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:347)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
at
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:314)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageCons
umer.java:565)
at
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
at org.jboss.mq.SpySession.run(SpySession.java:248)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:172)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja
va:728)
at java.lang.Thread.run(Thread.java:484)
[ERROR,StdServerSession] failed to commit/rollback
javax.transaction.RollbackException: Unable to commit, tx=XidImpl
[FormatId=257, GlobalId=cassia//182, BranchQual=] status=STATUS_ROLLEDBACK
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:351)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
at
org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:314)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageCons
umer.java:565)
at
org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
at org.jboss.mq.SpySession.run(SpySession.java:248)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:172)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.ja
va:728)
at java.lang.Thread.run(Thread.java:484)

--------------
try {
dbConn = getConnection();

update = "UPDATE Tasks SET state = ?, end_time = "
+ "(SELECT CURRENT_TIMESTAMP), errors = ?, warnings = ? "
+ "WHERE build_id = ?";

pstmt = dbConn.prepareStatement(update);

pstmt.setInt(1, (int) bInfo.getStatus());
pstmt.setInt(2, (int) bInfo.getErrors());
pstmt.setInt(3, (int) bInfo.getWarnings());
pstmt.setInt(4, (int) bInfo.getBuildId());

log.debug(Manager.class, update);

int rcnt = pstmt.executeUpdate();
}
catch (SQLException sqle) {
log.error(Manager.class, sqle.getMessage());
sqle.printStackTrace();
}
catch (Exception e) {
log.error(Manager.class, e.getMessage());
e.printStackTrace();
}
finally {
try {
if (pstmt != null)
pstmt.close();
}
catch (Exception e) {
log.error(Manager.class, e.getMessage());
}

try {
if (dbConn != null)
dbConn.close();
}
catch (Exception e) {
log.error(Manager.class, e.getMessage());
}
}
}

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Aaron Mulder 2002-08-01 06:50:34 Re: XA capable driver
Previous Message Aaron Mulder 2002-08-01 03:09:19 Re: XA capable driver