| Bug #56122 | JDBC4 functionality failure when using replication connections | ||
|---|---|---|---|
| Submitted: | 19 Aug 2010 15:17 | Modified: | 1 Dec 2015 18:06 |
| Reporter: | Todd Farmer (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / J | Severity: | S2 (Serious) |
| Version: | 5.1.13 | OS: | Any |
| Assigned to: | Alexander Soklakov | CPU Architecture: | Any |
[26 Nov 2012 12:35]
Alexander Soklakov
Just checked, it still actual.
[1 Dec 2015 18:06]
Daniel So
Added the following entry to the Connector/J 5.1.38 changelog: "Connector/J threw an AbstractMethodError when a JDBC 4 functionality (for example, createBlob()) was used on a replication-aware connection. This has been fixed by putting replication connections under the multi-host connection proxy structure."

Description: Connection.createBlob() - and other functionality introduced with JDBC4 - fails when using replication-aware connections: Exception in thread "main" java.lang.AbstractMethodError: com.mysql.jdbc.ReplicationConnection.createClob()Ljava/sql/Clob; How to repeat: try { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql:replication://localhost,localhost/test"; con = DriverManager.getConnection(url,sqlUser, sqlPasswd); con.createClob(); System.out.println("Success!"); con.close(); }catch( Exception e ) { e.printStackTrace(); } Suggested fix: Make replication-aware connections support JDBC4 functionality.