atom feed4 messages in org.codehaus.btm.dev[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) (ji@codehaus.org)
Date:Jan 4, 2010 10:01:37 am
List:org.codehaus.btm.dev

[
http://jira.codehaus.org/browse/BTM-60?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ludovic Orban updated BTM-60:

Fix Version/s: 1.3.4

NullPointerException in XAPool.containsXAResourceHolderMatchingGtrid()

----------------------------------------------------------------------

Key: BTM-60 URL: http://jira.codehaus.org/browse/BTM-60 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
bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:109) at
org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92) at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 144 more Caused by: java.lang.NullPointerException at
bitronix.tm.resource.common.XAPool.containsXAResourceHolderMatchingGtrid(XAPool.java:305) at bitronix.tm.resource.common.XAPool.getNotAccessible(XAPool.java:286) at
bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:96) at
bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:71) at
bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:105) ... 146 more