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

DataSet.insert() may fail when multiple threads attempt to insert. No exception is thrown.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b95
    • Introduced In Version:
      6
    • Resolved In Build:
      b98
    • CPU:
      x86
    • OS:
      windows_2000
    • Verification:
      Verified

      Description

      Zero or more threads in the attached test case may fail to insert with the message:

      java.sql.SQLException: Exception encountered: java.sql.SQLException: The last argument must be either a Connection or a DataSource
              at com.sun.sql.QueryObjectGeneratorImpl.getQueryImpl(QueryObjectGeneratorImpl.java:769)
              at com.sun.sql.QueryObjectGeneratorImpl.access$100(QueryObjectGeneratorImpl.java:24)
              at com.sun.sql.QueryObjectGeneratorImpl$2.run(QueryObjectGeneratorImpl.java:221)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.sql.QueryObjectGeneratorImpl.invoke(QueryObjectGeneratorImpl.java:216)
              at $Proxy0.getAddresses(Unknown Source)
              at ConcurrentQueryObjectTest.insertAddress(ConcurrentQueryObjectTest.java:126)
              at ConcurrentQueryObjectTest$ClientThread.run(ConcurrentQueryObjectTest.java:164)
              at java.lang.Thread.run(Thread.java:619)
      Inserting address in thread ThreadSafeID-9
      Failed to insert address in thread ThreadSafeID-9
      java.lang.NullPointerException
              at ConcurrentQueryObjectTest.insertAddress(ConcurrentQueryObjectTest.java:129)
              at ConcurrentQueryObjectTest$ClientThread.run(ConcurrentQueryObjectTest.java:164)
              at java.lang.Thread.run(Thread.java:619)import java.sql.BaseQuery;

      The stack trace is displayed but no exception is thrown. (The NPE occurs after the initial problem.) The error message displayed is not informative for the user.

        Attachments

          Issue Links

            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: