Bug #10630 | NullPointerException : com.mysql.jdbc.Statement.getWarnings(Statement.java:704) | ||
---|---|---|---|
Submitted: | 13 May 2005 17:47 | Modified: | 17 Oct 2005 19:42 |
Reporter: | Robert Simpson | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | MySQL Connector/J 3.1.8 | OS: | Windows (Windows XP) |
Assigned to: | Mark Matthews | CPU Architecture: | Any |
[13 May 2005 17:47]
Robert Simpson
[13 Jul 2005 19:43]
Robert Simpson
Looks like this might be more of a bug than I originally thought. We have also been experiencing this problem with "select ... into ..." statements in SQLj, and since in that case there's no iterator to close I have been unable to find a workaround. The problem is that SQLj does not reset the statement until the next time the same statement is used, and by that time MySQL may have released the connection. Suggested fix: Make sure the connection is not null before calling "getWarnings" on the connection object: ... if (this.connection != null && this.connection.getIO().versionMeetsMinimum(4, 1, 0)) { ...