-
Bug
-
Resolution: Fixed
-
P2
-
6
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.
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.
- relates to
-
JDK-6460067 A call to QueryObjectFactory.createDefaultQueryObject() loses the con object of a preceding call
- Closed