ManagedConnectionFactory releaseConnection can throw NullPointerException
-------------------------------------------------------------------------
Key: ISPN-564
URL:
https://jira.jboss.org/browse/ISPN-564
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 4.1.0.CR2, 4.0.0.Final
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Fix For: 4.1.0.Final
If ManagedConnectionFactory.getConnection throws an SQLException,
JdbcBinaryCacheStore.insertBucket calls into ManagedConnectionFactory.releaseConnection
which does not null check the connection. This can lead to exceptions like:
2010-07-27 11:18:58,658 [ERROR]
~main(org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory):
org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac,
BasicAction: -3f57377a:f88f:4c4f2303:2c status: ActionStatus.COMMITTING >; - nested
throwable: (javax.resource.ResourceException: Transaction is not active:
tx=TransactionImple < ac, BasicAction: -3f57377a:f88f:4c4f2303:2c status:
ActionStatus.COMMITTING >)
2010-07-27 11:18:58,661 [ERROR]
~main(org.infinispan.interceptors.InvocationContextInterceptor): Execution error:
java.lang.NullPointerException
at
org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.releaseConnection(ManagedConnectionFactory.java:103)
at
org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.loadBucket(JdbcBinaryCacheStore.java:216)
at
org.infinispan.loaders.bucket.BucketBasedCacheStore.storeLockSafe(BucketBasedCacheStore.java:54)
at org.infinispan.loaders.LockSupportCacheStore.store(LockSupportCacheStore.java:131)
at
org.infinispan.loaders.AbstractCacheStore.applyModifications(AbstractCacheStore.java:101)
at org.infinispan.loaders.AbstractCacheStore.commit(AbstractCacheStore.java:134)
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira