Bug #56099 JDBC4 functionality failure when using load-balanced connections
Submitted: 18 Aug 2010 21:41 Modified: 18 Nov 2010 15:51
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:5.1.13 OS:Any
Assigned to: Todd Farmer CPU Architecture:Any

[18 Aug 2010 21:41] Todd Farmer
Description:
Attempting to use JDBC4-specific functions on Connection objects causes failures:

Exception in thread "main" java.lang.AbstractMethodError: com.mysql.jdbc.LoadBalancedMySQLConnection.createBlob()Ljava/sql/Blob;
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.mysql.jdbc.LoadBalancingConnectionProxy.invoke(LoadBalancingConnectionProxy.java:476)
   at $Proxy0.createBlob(Unknown Source)

How to repeat:
1.  Start a load-balanced connection.
2.  Try Connection.createBlob();

Suggested fix:
Provide a JDBC4-compliant Connection object when using load-balanced connections.
[12 Nov 2010 18:46] Todd Farmer
Fixed and pushed in late August.
[18 Nov 2010 15:51] Tony Bedford
An entry has been added to the 5.1.14 changelog:

Attempting to use JDBC4 functions on Connection objects resulted in errors being generated:

Exception in thread "main" java.lang.AbstractMethodError:
com.mysql.jdbc.LoadBalancedMySQLConnection.createBlob()Ljava/sql/Blob;
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at
com.mysql.jdbc.LoadBalancingConnectionProxy.invoke(LoadBalancingConnectionProxy.java:476)
   at $Proxy0.createBlob(Unknown Source)