| Bug #26022 | Invalid exception thrown by getTransactionIsolation() | ||
|---|---|---|---|
| Submitted: | 1 Feb 2007 17:27 | Modified: | 1 Feb 2007 21:09 |
| Reporter: | Guillaume Smet | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | Connector / J | Severity: | S2 (Serious) |
| Version: | 5.0.4 | OS: | Linux (Linux) |
| Assigned to: | CPU Architecture: | Any | |
[1 Feb 2007 17:27]
Guillaume Smet
[1 Feb 2007 18:19]
Mark Matthews
I fail to see how Connection.getTransactionIsolation() can throw any of the exceptions from the java.net package, they're all checked exceptions. The driver wraps checked exceptions from network faults into SQLExceptions already, are you sure you're _really_ seeing a network exception thrown from the driver? If I test what you're doing, I get this: com.mysql.jdbc.CommunicationsException (which is a subclass of SQLException) Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.io.EOFException STACKTRACE: java.io.EOFException at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1908) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2299) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2798) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1568) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1660) at com.mysql.jdbc.Connection.execSQL(Connection.java:3214) at com.mysql.jdbc.Connection.execSQL(Connection.java:3143) at com.mysql.jdbc.Statement.executeQuery(Statement.java:1179) at com.mysql.jdbc.Connection.getTransactionIsolation(Connection.java:3775) at Foo.main(Foo.java:709) ** END NESTED EXCEPTION **
[1 Feb 2007 21:09]
Guillaume Smet
Hi Mark, Yes, you're right. The log provided by the user was incomplete. I reproduced the problem and the java.net.ConnectException is correctly nested in a SQLException. Sorry for the noise and thanks for your help.
