You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Euclides M (JIRA)" <ji...@apache.org> on 2016/07/25 19:55:20 UTC

[jira] [Commented] (DBCP-446) NullPointerException thrown when calling ManagedConnection.isClosed()

    [ https://issues.apache.org/jira/browse/DBCP-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15392562#comment-15392562 ] 

Euclides M commented on DBCP-446:
---------------------------------

Thanks Gary!
Is there an estimate when a version of DBCP will be released with this fix?

> NullPointerException thrown when calling ManagedConnection.isClosed()
> ---------------------------------------------------------------------
>
>                 Key: DBCP-446
>                 URL: https://issues.apache.org/jira/browse/DBCP-446
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.4, 2.1.1
>            Reporter: feng yang
>            Priority: Critical
>             Fix For: 2.2
>
>
> Hello all,
> I'm using commons-dbcp 1.4, and I found this exception. I don't if it's reported already before, I have done some searches in google, but nothing found. 
> Here is the call stack.
> 2015-08-18 15:01:50,091 [Thread-49] console : ERROR -   ... 44 more
> 2015-08-18 16:04:57,963 [Thread-45] console : ERROR - java.lang.NullPointerException
> 2015-08-18 16:04:57,965 [Thread-45] console : ERROR -   at org.apache.commons.dbcp.DelegatingConnection.isClosed(DelegatingConnection.java:386)
> 2015-08-18 16:04:57,965 [Thread-45] console : ERROR -   at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.releaseConnection(LogicalConnectionImpl.java:237)
> 2015-08-18 16:04:57,965 [Thread-45] console : ERROR -   at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.aggressiveRelease(LogicalConnectionImpl.java:200)
> 2015-08-18 16:04:57,965 [Thread-45] console : ERROR -   at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.afterTransaction(JdbcCoordinatorImpl.java:272)
> 2015-08-18 16:04:57,965 [Thread-45] console : ERROR -   at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.afterTransaction(TransactionCoordinatorImpl.java:144)
> 2015-08-18 16:04:57,965 [Thread-45] console : ERROR -   at org.hibernate.engine.transaction.internal.jta.JtaTransaction.afterAfterCompletion(JtaTransaction.java:179)
> 2015-08-18 16:04:57,966 [Thread-45] console : ERROR -   at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:219)
> So when I debugged it, it created a ManagedConnection, which is a sub-class of DelegatingConnection, and the _conn is initialized with null, and the _closed is false by default. So when hibernate calls the isClosed(), it throws a nullpointer exception.
> Could you guys tell me if in your side, or the hibernate side ?
> Do not hesitate to contact me if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)