| Bug #13581 | NullPointerException at com.mysql.jdbc.ResultSet.<init>(ResultSet.java:366) | ||
|---|---|---|---|
| Submitted: | 28 Sep 2005 18:38 | Modified: | 31 Mar 2014 9:38 |
| Reporter: | Steve Ragle | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | Connector / J | Severity: | S3 (Non-critical) |
| Version: | 3.1.10 | OS: | Windows (Windows XP) |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[30 Sep 2005 8:33]
Vasily Kishkin
Could you please provide full test of test case ?
[1 Nov 2005 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[31 Mar 2014 9:38]
Alexander Soklakov
It's a duplicate of Bug#17099.

Description: with this url: sql.url = jdbc:mysql://${sql.host}/${sql.database}?autoReconnectForPools=true&prepStmtCacheSize=50&cachePrepStmts=true&elideSetAutoCommits=true&useLocalSessionState=true&profileSQL=false&useUsageAdvisor=false&gatherPerfMetrics=true I get this exception when using getGeneratedKeys: java.lang.NullPointerException at com.mysql.jdbc.ResultSet.<init>(ResultSet.java:366) at com.mysql.jdbc.Statement.getGeneratedKeysInternal(Statement.java:1157) at com.mysql.jdbc.Statement.getGeneratedKeys(Statement.java:1120) at com.mysql.jdbc.PreparedStatement.getGeneratedKeys(PreparedStatement.java:1483) at org.apache.commons.dbcp.DelegatingStatement.getGeneratedKeys(DelegatingStatement.java:305) at org.apache.commons.dbcp.DelegatingStatement.getGeneratedKeys(DelegatingStatement.java:305) ... it appears that the tableName at that line is null. How to repeat: happens every time getGeneratedKeys() is called on a prepared statement to retrieve the generated keys after executing the ps update. turning off the perfMetrics option fixes the NPE