[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: [jira] [Updated] (DBCP-438) Nested connections in a transaction (local) throws null pointer
From: "Raihan Kibria (JIRA)" <jira () apache ! org>
Date: 2015-04-30 11:27:06
Message-ID: JIRA.12826266.1430389425000.33868.1430393226030 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/DBCP-438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Raihan Kibria updated DBCP-438:
-------------------------------
Description:
In a transaction context, if we open multiple connections and close each of them \
after commit, we get a null pointer exception. Sample code: \
transactionManager.begin();
Connection c1 = null;
Connection c2 = null;
c1 = newConnection();
c2 = newConnection();
transactionManager.commit();
try{
c1.close();
}catch(Exception e){
e.printStackTrace();
}
try{
c2.close();
}catch(Exception e){
//throws execption
e.printStackTrace();
}
Null pointer is thrown at:
org.apache.commons.dbcp2.DelegatingConnection.closeInternal
Affects versions-- 2.1, 2.0
was:
In a transaction context, if we open multiple connections and close each of them \
after commit, we get a null pointer exception. Sample code: \
transactionManager.begin();
Connection c1 = null;
Connection c2 = null;
c1 = newConnection();
c2 = newConnection();
transactionManager.commit();
try{
c1.close();
}catch(Exception e){
e.printStackTrace();
}
try{
c2.close();
}catch(Exception e){
//throws execption
e.printStackTrace();
}
Null pointer is thrown at:
org.apache.commons.dbcp2.DelegatingConnection.closeInternal
Affects versions-- 2.0.1, 2.2.01
> Nested connections in a transaction (local) throws null pointer
> ---------------------------------------------------------------
>
> Key: DBCP-438
> URL: https://issues.apache.org/jira/browse/DBCP-438
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: All (linux, aix, windows)
> Reporter: Raihan Kibria
> Attachments: TestManagedDataSourceInNesetedConnTx.java, dbcpNull.png
>
>
> In a transaction context, if we open multiple connections and close each of them \
> after commit, we get a null pointer exception. Sample code: \
> transactionManager.begin();
> Connection c1 = null;
> Connection c2 = null;
>
> c1 = newConnection();
> c2 = newConnection();
>
> transactionManager.commit();
>
> try{
> c1.close();
> }catch(Exception e){
> e.printStackTrace();
> }
>
> try{
> c2.close();
> }catch(Exception e){
> //throws execption
> e.printStackTrace();
> }
> Null pointer is thrown at:
> org.apache.commons.dbcp2.DelegatingConnection.closeInternal
> Affects versions-- 2.1, 2.0
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic