atom feed4 messages in[btm-dev] [jira] Updated: (BTM-60) Nu...
FromSent OnAttachments
Jordan (JIRA)Jan 4, 2010 9:54 am 
Ludovic Orban (JIRA)Jan 4, 2010 10:01 am 
Ludovic Orban (JIRA)Jan 6, 2010 2:57 am 
Ludovic Orban (JIRA)Jan 6, 2010 3:00 am 
Subject:[btm-dev] [jira] Updated: (BTM-60) NullPointerException in XAPool.containsXAResourceHolderMatchingGtrid()
From:Ludovic Orban (JIRA) (
Date:Jan 4, 2010 10:01:37 am


Ludovic Orban updated BTM-60:

Fix Version/s: 1.3.4

NullPointerException in XAPool.containsXAResourceHolderMatchingGtrid()


Key: BTM-60 URL: Project: BTM Issue Type: Bug Affects Versions: 1.3.3 Reporter: Jordan Assignee: Ludovic Orban Fix For: 1.3.4

Attachments: btm-xapool-npe-fix.patch

While testing BTM on a somewhat slow server, we noticed a NullPointerException
in XAPool.containsXAResourceHolderMatchingGtrid() that was breaking stuff. It seems like nobody was checking if bitronixXid was null before calling a
method on it. I've included a patch which I believe fixes this problem but I'm not completely
sure if it is the correct action to take because I don't know how BTM works.
Essentially, if bitronixXid is null, it just skips that resource instead of
causing a NullPointerException. Here's the relevant stack trace: Caused by: java.sql.SQLException: unable to get a connection from pool of a
PoolingDataSource containing an XAPool of resource jdbc/DS with 5 connection(s)
(3 still available) at at
org.hibernate.connection.DatasourceConnectionProvider.getConnection( at
org.hibernate.jdbc.ConnectionManager.openConnection( ... 144 more Caused by: java.lang.NullPointerException at at at at at ... 146 more