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

Attempt to close Query object after closing DataSet throws NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 6
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b98
    • CPU:
      x86
    • OS:
      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

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: