Uploaded image for project: 'Commons DBCP'
  1. Commons DBCP
  2. DBCP-446

NullPointerException thrown when calling ManagedConnection.isClosed()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.4, 2.1.1
    • 2.2.0
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yfeng feng yang
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: