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)

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.