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

XMLWordPrintable

    • b95
    • 6
    • b98
    • x86
    • windows_2000
    • Verified

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: