Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6459029

Attempt to close Query object after closing DataSet throws NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 6
    • 6
    • core-libs
    • b98
    • x86
    • windows_2000

    Description

      After closing a DataSet, an attempt to close the associated Query object throws a NPE, even though the isClosed() method of the Query object returns false.

      The attached test case produces the following output:

      Dropping table...
      Creating table...
      Closing DataSet addressesDS.
      Is addressesDS closed? true
      Is Query object aq closed? false
      Closing Query object aq.
      Exception in thread "main" java.sql.SQLRuntimeException: java.lang.NullPointerException
              at com.sun.sql.QueryObjectGeneratorImpl.deregisterAllDataSets(Unknown Source)
              at com.sun.sql.QueryObjectGeneratorImpl.invoke(Unknown Source)
              at $Proxy0.close(Unknown Source)
              at CloseTest.main(CloseTest.java:67)
      Caused by: java.lang.NullPointerException
              at com.sun.sql.DataSetImpl$DataSetItr.<init>(Unknown Source)
              at com.sun.sql.DataSetImpl.iterator(Unknown Source)
              at java.util.AbstractList.hashCode(AbstractList.java:524)
              at java.util.WeakHashMap.remove(WeakHashMap.java:543)
              at java.util.WeakHashMap$HashIterator.remove(WeakHashMap.java:779)
              ... 4 more

      Attachments

        Activity

          People

            kssaxena Kshitiz Saxena (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: