The default implementation of JdbcInterceptor.invoke passes itself as the proxy argument to the next interceptor in the chain. I'm thinking this should really pass the 'proxy' argument. This means that interceptors cannot cast the 'proxy' argument to a java.sql.Connection. JdbcInterceptor line 94 should look like this: if (getNext()!=null) return getNext().invoke(proxy,method,args); instead of this: if (getNext()!=null) return getNext().invoke(this,method,args);
Thanks for report. This is fixed in r1186681 and will be in 7.0.23 onwards.